GHSA-pfq2-hh62-7m96: Renovate Renovate Vulnerable To Arbitrary Command Vulnerability

MODERATE
CVSS 6.7
CWE-78
Published
Advisory Summary

GHSA-pfq2-hh62-7m96 is a MODERATE (CVSS 6.7) renovate vulnerable to arbitrary command vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Renovate libraries in the npm ecosystem. The issue involves renovate vulnerable to arbitrary command injection via gradle wrapper and malicious `distributionurl`. Remediation is available by upgrading affected packages to version 42.68.5.

GHSA-pfq2-hh62-7m96 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-pfq2-hh62-7m96
Severity MODERATE
CVSS v3.1 Base Score 6.7
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Renovate
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-pfq2-hh62-7m96

To remediate this vulnerability, upgrade all affected Renovate dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

renovate fixed: 42.68.5
npm install renovate@42.68.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls renovate

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-pfq2-hh62-7m96, inspect your project dependencies using npm:

npm ls renovate

Analyze the terminal output to locate any version of Renovate in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 42.68.5), your application is affected.

Note: The npm ls renovate command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Renovate, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Renovate can be tricked into executing shell code while updating the Gradle Wrapper. A malicious `distributionUrl` in `gradle/wrapper/gradle-wrapper.properties` can lead to command execution in the Renovate runtime. ### Details When Renovate handles Gradle Wrapper artifacts, it may run a wrapper update command such as: - `./gradlew :wrapper --gradle-distribution-url <value>` In the observed behavior, Renovate executes this via a shell (e.g., `/bin/sh -c ...`). If `distributionUrl` contains shell command substitution syntax like `$(...)`, the shell evaluates it **before** Gradle validates/parses the URL. After that, Gradle attempts to parse the URL as a URI and fails with `URISyntaxException`, but the shell substitution has already executed. This is reproducible even when `allowScripts` is disabled (default is OFF), because this execution happens as part of Gradle Wrapper artifact handling rather than “repository install scripts”. Prerequisites / attack conditions: - The attacker must be able to get a malicious `gradle-wrapper.properties` into a repository that Renovate scans (e.g., direct write access, or a maintainer merges an attacker’s change/PR). - Renovate must be configured to process Gradle Wrapper updates/artifacts for that repository (default behavior for the Gradle Wrapper manager). ### PoC 1. Create a repository with a Gradle Wrapper (`gradlew`, `gradlew.bat`, `gradle/wrapper/gradle-wrapper.jar`, and `gradle/wrapper/gradle-wrapper.properties`). 2. Set `distributionUrl` in `gradle-wrapper.properties` to include `$(...)`. 3. Run Renovate against the repository. 4. Observe that a file is created during Renovate’s wrapper update step **before** Gradle fails with `URISyntaxException`. A [screen recording](https://drive.google.com/file/d/1nveSCgyz4pKPCZuelqDD_xGEO00DXr4P/view) is attached showing end-to-end reproduction. In the demo, the payload creates `/tmp/passwd_dump` containing `/etc/passwd`, demonstrating that file read/exfiltration is possible within the Renovate execution context. ### Impact This allows arbitrary command execution in the Renovate runtime during Gradle Wrapper updates. Depending on deployment, this may expose credentials/tokens available to the bot and may allow an attacker to modify repositories or access internal resources reachable from the Renovate environment. ### Remediation Upgrading to Renovate [42.68.5](https://github.com/renovatebot/renovate/releases/tag/42.68.5) (2025-12-31) fixes this issue, and closes out other risks of shell evaluation for commands run by Renovate. If using the `composer`, `yarn` (v1) or `flux` managers, please upgrade to [42.74.5](https://github.com/renovatebot/renovate/releases/tag/42.74.5) (2026-01-08), as there were follow-up fixes to keep these managers working.

GHSA-pfq2-hh62-7m96 Affected Renovate Versions

1 component(s)
Fixed Versions:
42.68.5
Product / Package Ecosystem Affected Versions Fixed Version
renovate
npm
≥ 32.124.0
< 42.68.5
42.68.5

References

Frequently Asked Questions

What is GHSA-pfq2-hh62-7m96?
GHSA-pfq2-hh62-7m96 is a security vulnerability in Renovate involving Renovate vulnerable to arbitrary command injection via Gradle Wrapper and malicious `distributionUrl` under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Renovate versions are affected?
Affected versions include releases prior to 42.68.5 across affected packages: renovate.
What version fixes GHSA-pfq2-hh62-7m96?
Upgrading to 42.68.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is renovate affected?
Yes, renovate is affected in releases prior to 42.68.5. Upgrade your dependency to 42.68.5 or later.
What is the CVSS score of GHSA-pfq2-hh62-7m96?
GHSA-pfq2-hh62-7m96 has a CVSS v3.1 base score of 6.7 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-pfq2-hh62-7m96?
GHSA-pfq2-hh62-7m96 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for GHSA-pfq2-hh62-7m96?
Run the dependency tree command: 'npm ls renovate'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pfq2-hh62-7m96",
  "modified" : "2026-01-13T19:54:29Z",
  "published" : "2026-01-13T19:54:29Z",
  "aliases" : [ ],
  "summary" : "Renovate vulnerable to arbitrary command injection via Gradle Wrapper and malicious `distributionUrl`",
  "details" : "### Summary\nRenovate can be tricked into executing shell code while updating the Gradle Wrapper. A malicious `distributionUrl` in `gradle/wrapper/gradle-wrapper.properties` can lead to command execution in the Renovate runtime.\n\n### Details\nWhen Renovate handles Gradle Wrapper artifacts, it may run a wrapper update command such as:\n- `./gradlew :wrapper --gradle-distribution-url <value>`\n\nIn the observed behavior, Renovate executes this via a shell (e.g., `/bin/sh -c ...`).  \nIf `distributionUrl` contains shell command substitution syntax like `$(...)`, the shell evaluates it **before** Gradle validates/parses the URL.\n\nAfter that, Gradle attempts to parse the URL as a URI and fails with `URISyntaxException`, but the shell substitution has already executed.\n\nThis is reproducible even when `allowScripts` is disabled (default is OFF), because this execution happens as part of Gradle Wrapper artifact handling rather than “repository install scripts”.\n\nPrerequisites / attack conditions:\n- The attacker must be able to get a malicious `gradle-wrapper.properties` into a repository that Renovate scans (e.g., direct write access, or a maintainer merges an attacker’s change/PR).\n- Renovate must be configured to process Gradle Wrapper updates/artifacts for that repository (default behavior for the Gradle Wrapper manager).\n\n### PoC\n1. Create a repository with a Gradle Wrapper (`gradlew`, `gradlew.bat`, `gradle/wrapper/gradle-wrapper.jar`, and `gradle/wrapper/gradle-wrapper.properties`).\n2. Set `distributionUrl` in `gradle-wrapper.properties` to include `$(...)`.\n3. Run Renovate against the repository.\n4. Observe that a file is created during Renovate’s wrapper update step **before** Gradle fails with `URISyntaxException`.\n\nA [screen recording](https://drive.google.com/file/d/1nveSCgyz4pKPCZuelqDD_xGEO00DXr4P/view) is attached showing end-to-end reproduction. In the demo, the payload creates `/tmp/passwd_dump` containing `/etc/passwd`, demonstrating that file read/exfiltration is possible within the Renovate execution context.\n\n### Impact\nThis allows arbitrary command execution in the Renovate runtime during Gradle Wrapper updates. Depending on deployment, this may expose credentials/tokens available to the bot and may allow an attacker to modify repositories or access internal resources reachable from the Renovate environment.\n\n### Remediation\n\nUpgrading to Renovate [42.68.5](https://github.com/renovatebot/renovate/releases/tag/42.68.5) (2025-12-31) fixes this issue, and closes out other risks of shell evaluation for commands run by Renovate.\n\nIf using the `composer`, `yarn` (v1) or `flux` managers, please upgrade to [42.74.5](https://github.com/renovatebot/renovate/releases/tag/42.74.5) (2026-01-08), as there were follow-up fixes to keep these managers working.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "renovate"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "32.124.0"
      }, {
        "fixed" : "42.68.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/renovatebot/renovate/security/advisories/GHSA-pfq2-hh62-7m96"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/renovatebot/renovate"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/renovatebot/renovate/releases/tag/42.68.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-13T19:54:29Z",
    "nvd_published_at" : null
  }
}