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.
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
npm install docusaurus-plugin-content-gists@^4.0.0personalAccessToken from your plugin configurationGH_PERSONAL_ACCESS_TOKEN is set in your build environment| Score | Percentile |
|---|---|
| 9.12% | 92.68% |
| Base score | Version | Severity | Vector |
|---|---|---|---|
| 10.0 | 3.1 | — |
|
| Type | Value |
|---|---|
| GHSA | GHSA-qf34-qpr4-5pph ↗ |
| CVE | CVE-2025-53624 ↗ |
| CWE id | Name |
|---|---|
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor |
Vulnerable version ranges and first patched releases as published by GitHub.
| Ecosystem | Package | Vulnerable range | First patched | Vulnerable functions |
|---|---|---|---|---|
| npm | docusaurus-plugin-content-gists | < 4.0.0 | 4.0.0 | — |