GHSA-QF34-QPR4-5PPH
Vulnerability from github – Published: 2025-07-09 22:40 – Updated: 2025-07-09 22:40GitHub 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": [
{
"package": {
"ecosystem": "npm",
"name": "docusaurus-plugin-content-gists"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-53624"
],
"database_specific": {
"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"
},
"details": "## GitHub Personal Access Token Exposure in docusaurus-plugin-content-gists\n\n### Summary\n\ndocusaurus-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\u0027s source code.\n\n### Affected Versions\n\n- All versions \u003c 4.0.0\n\n### Patched Versions\n\n- Version 4.0.0 and later\n\n### Impact\n\nWhen using the affected versions with the recommended configuration pattern:\n\n```javascript\nplugins: [\n [\n \u0027docusaurus-plugin-content-gists\u0027,\n {\n personalAccessToken: process.env.GITHUB_PERSONAL_ACCESS_TOKEN,\n },\n ],\n]\n```\n\nThe GitHub Personal Access Token is included in the webpack bundle and exposed in production builds at:\n- `/build/assets/js/main.[hash].js`\n\nThis allows malicious actors to:\n- Extract the GitHub Personal Access Token from the website\u0027s JavaScript files\n- Use the stolen token to access the token owner\u0027s GitHub account with the granted permissions\n- Potentially access private gists, repositories, or perform other actions depending on the token\u0027s scope\n\n## Mitigation steps\n\n 1. Immediately revoke access to the GitHub PAT that was used: https://github.com/settings/tokens\n\n### Migration steps\n\n 1. Update to version 4.0.0+: `npm install docusaurus-plugin-content-gists@^4.0.0`\n 3. Remove `personalAccessToken` from your plugin configuration\n 4. Ensure `GH_PERSONAL_ACCESS_TOKEN` is set in your build environment",
"id": "GHSA-qf34-qpr4-5pph",
"modified": "2025-07-09T22:40:07Z",
"published": "2025-07-09T22:40:06Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/webbertakken/docusaurus-plugin-content-gists/security/advisories/GHSA-qf34-qpr4-5pph"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-53624"
},
{
"type": "WEB",
"url": "https://github.com/webbertakken/docusaurus-plugin-content-gists/commit/8d4230b82412edb215ddfa9e609d178510a5fe31"
},
{
"type": "PACKAGE",
"url": "https://github.com/webbertakken/docusaurus-plugin-content-gists"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "docusaurus-plugin-content-gists vulnerability exposes GitHub Personal Access Token"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.