Kurz gesagt
- CVE-2025-53624 ist eine Schwachstelle (KRITISCH (CVSS 10.0)) in docusaurus-plugin-content-gists.
- Wahrscheinlichkeit einer Ausnutzung in den nächsten 30 Tagen (EPSS): 2.0%, höher als bei 81.2% aller Schwachstellen.
- Abhilfe: auf 4.0.0 oder neuer aktualisieren.
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
Patched Versions
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
personalAccessToken from your plugin configuration
- Ensure
GH_PERSONAL_ACCESS_TOKEN is set in your build environment
NVD description
The Docusaurus gists plugin adds a page to your Docusaurus instance, displaying all public gists of a GitHub user. 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. This vulnerability is fixed in 4.0.0.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free