CVE-2025-54956
Linux Debian vulnerability analysis and mitigation

Overview

CVE-2025-54956 is an information disclosure vulnerability in the gh package for R (maintained by r-lib/Posit) where HTTP responses are returned in a data structure that also includes the Authorization header from the originating HTTP request. This means any GitHub API token passed to gh() calls is embedded in the returned R object. The vulnerability affects all versions of the gh package before 1.5.0. It was disclosed on August 3, 2025, with the fix committed shortly after. It carries a CVSS v3.1 base score of 3.2 (Low), reflecting a local, high-complexity attack vector with changed scope but limited confidentiality impact (Feedly, GitHub Issue).

Technical details

The root cause is classified as CWE-669 (Incorrect Resource Transfer Between Spheres): the gh_process_response() function in R/gh_response.R attached the full request object — including its headers field containing the Authorization header — as an attribute of the returned response object. This means the GitHub API token is stored in the R object returned to the caller. The fix (commit b575d48) introduced a remove_headers() helper that strips the headers key from the request before attaching it to the response, and updated pagination functions (gh_next(), gh_prev(), gh_first(), gh_last()) to accept explicit .token and .send_headers parameters instead of relying on stored request headers (GitHub Commit, GitHub Issue). The issue was responsibly disclosed by researcher @foysal1197 and acknowledged under Posit Security Advisory PSA-1649 (GitHub Commit).

Impact

The primary risk is inadvertent exposure of GitHub API tokens (Personal Access Tokens or OAuth tokens). If a user serializes the gh() return value — for example, saving it as an .rds file and committing it to a public or shared repository — the embedded Authorization header would expose the token to anyone with access to that file. This could allow an attacker who obtains the serialized object to authenticate to the GitHub API with the victim's credentials, enabling unauthorized access to repositories, organization data, or other GitHub resources scoped to that token (GitHub Issue, Feedly).

Exploitability

There is no evidence of active in-the-wild exploitation, and no public exploit code or PoC has been identified. The EPSS score is approximately 0.011% (0.000110), indicating very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires local access to a serialized R object (e.g., an .rds file) that was created using a vulnerable version of the gh package and then shared or committed to a repository (Feedly).

Exploitation steps

  1. Identify exposed serialized objects: Search public repositories (e.g., via GitHub code search or Google dorks) for .rds files committed by R users who use the gh package.
  2. Download the serialized object: Retrieve the .rds file from the public or accessible repository.
  3. Load the object in R: Use readRDS('file.rds') to load the object into an R session.
  4. Extract the Authorization header: Access the embedded request attributes with attr(obj, 'request')$headers or inspect the headers element to retrieve the Authorization value containing the GitHub token.
  5. Use the token: Authenticate to the GitHub API using the extracted token (e.g., via curl -H 'Authorization: token <extracted_token>' https://api.github.com/user) to access the victim's GitHub account and resources (GitHub Issue, GitHub Commit).

Indicators of compromise

  • File System: .rds files in R project directories or repositories that, when loaded, contain an attr(..., 'request') with a headers field including an Authorization key — indicative of objects saved with a vulnerable gh version before 1.5.0.
  • Logs: Unexpected GitHub API authentication events from unfamiliar IP addresses or user agents associated with a token that is also used in R workflows.
  • Network: GitHub API calls using a token from IP addresses inconsistent with the token owner's normal usage patterns, potentially indicating token theft from a leaked .rds file.

Mitigation and workarounds

Upgrade the gh R package to version 1.5.0 or later, which removes the Authorization header from the request object stored in the response. Users who previously saved gh() return values to .rds files or other serialized formats should treat those files as potentially containing sensitive tokens, revoke and rotate any exposed GitHub tokens immediately, and regenerate the cached objects using the patched version. The fix is available via CRAN and the r-lib GitHub repository (GitHub Commit, GitHub Compare). Debian LTS users can apply the security update announced in DLA-4378-1 (Debian LTS).

Community reactions

The issue was originally filed by Hadley Wickham (r-lib maintainer) on April 23, 2025, who noted the practical risk of users caching API responses as .rds files and accidentally committing them to GitHub, thereby exposing API keys. Posit formally acknowledged the issue under security advisory PSA-1649 and credited researcher @foysal1197 for responsible disclosure. A Medium article summarizing the vulnerability was published shortly after the CVE was assigned (Medium, GitHub Issue).

Additional resources


SourceThis report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-78683CRITICAL9.4
  • Linux Debian logoLinux Debian
  • nltk
NoYesAug 25, 2026
CVE-2026-78682HIGH8.7
  • Linux Debian logoLinux Debian
  • nltk
NoYesAug 25, 2026
CVE-2026-78681HIGH8.7
  • Linux Debian logoLinux Debian
  • nltk
NoYesAug 25, 2026
CVE-2026-78680HIGH8.5
  • Linux Debian logoLinux Debian
  • nltk
NoYesAug 25, 2026
CVE-2026-78679HIGH7.1
  • Linux Debian logoLinux Debian
  • python-git
NoNoAug 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management