NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2025-53624: docusaurus-plugin-content-gists vulnerability exposes GitHub Personal Access Token

criticalCVSS 3.1 10.0GHSA-qf34-qpr4-5pph

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.

Published Jul 9, 2025

Affected packages

docusaurus-plugin-content-gists

Ecosystem
npm
Affected
< 4.0.0
Fixed in
4.0.0
Check
npm ls docusaurus-plugin-content-gists

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

Credited to webbertakken.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology