{"id":"CVE-2026-76228","aliases":["CVE-2026-76228","GHSA-pfq2-hh62-7m96"],"related":[],"kind":"vulnerability","state":"published","title":"Renovate before 42.68.5 Remote Code Execution via Gradle Wrapper","summary":"Renovate versions >=32.124.0 and before 42.68.5 (and Mend renovate-ce/renovate-ee before 13.3.0) contain a command injection vulnerability in Gradle Wrapper artifact handling. When Renovate processes Gradle Wrapper updates, it invokes a wrapper update command via a shell (e.g. /bin/sh -c ... ./gradlew :wrapper --gradle-distribution-url <value>). If an attacker supplies a malicious gradle-wrapper.properties whose distributionUrl contains shell command substitution syntax such as $(...), the shell evaluates it before Gradle parses the URL, resulting in arbitrary command execution in the Renovate runtime. Exploitation requires the attacker to introduce the malicious file into a repository that Renovate scans; the issue occurs even when allowScripts is disabled.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Renovate versions >=32.124.0 and before 42.68.5 (and Mend renovate-ce/renovate-ee before 13.3.0) contain a command injection vulnerability in Gradle Wrapper artifact handling. When Renovate processes Gradle Wrapper updates, it invokes a wrapper update command via a shell (e.g. /bin/sh -c ... ./gradlew :wrapper --gradle-distribution-url <value>). If an attacker supplies a malicious gradle-wrapper.properties whose distributionUrl contains shell command substitution syntax such as $(...), the shell evaluates it before Gradle parses the URL, resulting in arbitrary command execution in the Renovate runtime. Exploitation requires the attacker to introduce the malicious file into a repository that Renovate scans; the issue occurs even when allowScripts is disabled.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2026-01-13T19:54:29.000Z","modified":"2026-10-08T16:17:42.583Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.4,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.4,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.7,"rating":"MEDIUM"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"type":"semver","introduced":"32.124.0","fixed":"42.68.5","status":"affected"},{"type":"semver","version":"42.68.5","status":"unaffected"}],"vendor":"renovatebot","product":"renovate","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"13.3.0","status":"affected"},{"type":"semver","version":"13.3.0","status":"unaffected"}],"vendor":"mend","product":"renovate-ce","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"13.3.0","status":"affected"},{"type":"semver","version":"13.3.0","status":"unaffected"}],"vendor":"mend","product":"renovate-ee-server","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"13.3.0","status":"affected"},{"type":"semver","version":"13.3.0","status":"unaffected"}],"vendor":"mend","product":"renovate-ee-worker","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"32.124.0","status":"affected","fixed":"42.68.5"}],"ecosystem":"npm","package":"renovate","purl":"pkg:npm/renovate","source":"ghsa"}],"references":[{"url":"https://github.com/renovatebot/renovate/security/advisories/GHSA-pfq2-hh62-7m96","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/renovate-before-remote-code-execution-via-gradle-wrapper","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/renovatebot/renovate","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/renovatebot/renovate/releases/tag/42.68.5","tags":["web"],"sources":["ghsa"]}],"credits":["y4rvin"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-08-19T14:47:23.066Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-76228","url":"https://www.cve.org/CVERecord?id=CVE-2026-76228","licence":"CVE Terms of Use","modified":"2026-10-08T15:25:04.592Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pfq2-hh62-7m96","url":"https://github.com/advisories/GHSA-pfq2-hh62-7m96","licence":"CC-BY-4.0","modified":"2026-08-20T04:04:14.407Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-76228","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-76228","licence":"Public domain","modified":"2026-10-08T16:17:42.583Z"}],"updatedAt":"2026-11-25T22:59:33.938Z","epss":{"score":0.00844,"percentile":0.59086,"date":"2026-12-01T12:00:22.000Z"}}