| Package | Affected versions | Patched versions |
|---|---|---|
| docusaurus-plugin-content-gists | < 4.0.0 | 4.0.0 |
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].jsThis allows malicious actors to:
npm install docusaurus-plugin-content-gists@^4.0.0personalAccessToken from your plugin configurationGH_PERSONAL_ACCESS_TOKEN is set in your build environmentRunning one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free