Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

GHSA-qf34-qpr4-5pph

CriticalCVSS 10 / 10
Published Jul 9, 2025·Last modified Jul 9, 2025
Affected Components(0)

No affected components available

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

  • 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

  1. Immediately revoke access to the GitHub PAT that was used: https://github.com/settings/tokens

Migration steps

  1. Update to version 4.0.0+: npm install docusaurus-plugin-content-gists@^4.0.0
  2. Remove personalAccessToken from your plugin configuration
  3. Ensure GH_PERSONAL_ACCESS_TOKEN is set in your build environment
Risk Scores
Base Score
10.0

The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The vulnerability can affect other systems as well, not just the initial system. There is a high impact on the confidentiality of the information. There is a high impact on the integrity of the data. There is a high impact on the availability of the system.

Threat Intelligence
9.1

Active exploitation in the wild has been confirmed. Immediate patching or mitigation is required.

EPSS
1.84%

The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard