GHSA-qf34-qpr4-5pph
CRITICALdocusaurus-plugin-content-gists vulnerability exposes GitHub Personal Access Token
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
docusaurus-plugin-content-gistsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
GitHub Personal Access Token Exposure in docusaurus-plugin-content-gists
Summary
docusaurus-plugin-content-gists versions prior to 4.0.0 are vulnerable to exposing GitHub Personal Access Tokens in production build artifacts when passed through plugin configuration options. The token, intended for build-time API access only, is inadvertently included in client-side JavaScript bundles, making it accessible to anyone who can view the website's source code.
Affected Versions
- All versions < 4.0.0
Patched Versions
- Version 4.0.0 and later
Impact
When using the affected versions with the recommended configuration pattern:
plugins: [
[
'docusaurus-plugin-content-gists',
{
personalAccessToken: process.env.GITHUB_PERSONAL_ACCESS_TOKEN,
},
],
]
The GitHub Personal Access Token is included in the webpack bundle and exposed in production builds at:
/build/assets/js/main.[hash].js
This allows malicious actors to:
- Extract the GitHub Personal Access Token from the website's JavaScript files
- Use the stolen token to access the token owner's GitHub account with the granted permissions
- Potentially access private gists, repositories, or perform other actions depending on the token's scope
Mitigation steps
- Immediately revoke access to the GitHub PAT that was used: https://github.com/settings/tokens
Migration steps
- Update to version 4.0.0+:
npm install docusaurus-plugin-content-gists@^4.0.0 - Remove
personalAccessTokenfrom your plugin configuration - Ensure
GH_PERSONAL_ACCESS_TOKENis set in your build environment
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | docusaurus-plugin-content-gists | all versions | 4.0.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for docusaurus-plugin-content-gists. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update docusaurus-plugin-content-gists to 4.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qf34-qpr4-5pph is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-qf34-qpr4-5pph is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-qf34-qpr4-5pph. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-qf34-qpr4-5pph in your dependencies?
O3 detects GHSA-qf34-qpr4-5pph across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.