Skip to content

Write access to GitHub repositories using deploy key in Read the Docs for Business

Critical
stsewd published GHSA-jqm9-f79c-8wx6 Jul 2, 2025

Package

Read the Docs for Business (Python)

Affected versions

<14.1.0

Patched versions

14.1.0

Description

Impact

This vulnerability could have allowed an attacker to gain write access to a GitHub repository (push to existing branches/tags or create new ones). This was due to our application mistakenly creating deploy keys with read and write access, instead of read-only access for GitHub. In order to exploit this vulnerability, a malicious user needs to be able to create a branch or open pull request on the repository, and trigger a build to the Read the Docs project.

Read the Docs Community (https://app.readthedocs.org) isn't affected by this vulnerability. For most projects on Read the Docs Business (https://app.readthedocs.com/) we were able to automatically migrate existing keys to read-only, for projects where we were unable to do this, owners should have received an email about the steps to follow. We have resolved the issue, ensuring new deploy keys are read-only, and implemented safeguards to prevent exploitation of any remaining projects with deploy keys with write access.

This issue was discovered by a member of our team, and we have seen no signs that this vulnerability was exploited in the wild.

Custom installations

This vulnerability was present in our private version of Read the Docs, custom installations aren't affected.

Patches

This vulnerability has been patched with our 14.1.0 release.

Why did this happen?

We use the GitHub API to create deploy keys. This API accepts a read_only parameter, which defaults to false (write access) if not specified. Our code did not explicitly set this parameter, resulting in deploy keys being created with write access. GitHub used to support write access only keys in the past.

References

Other fixes have been applied in our private code, we can't share those patches publicly.

For more information

You can read more information about this issue in our blog post.

If you have any questions or comments about this advisory, email us at [email protected] (PGP)

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
None
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H

CVE ID

No known CVE

Weaknesses

Incorrect Privilege Assignment

A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor. Learn more on MITRE.

Credits