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 environment{
"cwe_ids": [
"CWE-200"
],
"github_reviewed": true,
"github_reviewed_at": "2025-07-09T22:40:06Z",
"nvd_published_at": "2025-07-09T21:15:27Z",
"severity": "CRITICAL"
}