Vulnerability in Gradle (CVE-2021-29429)
Summary
Vulnerability in Gradle (CVE-2021-29429). Risk of unauthorized operations or information disclosure. Exploitable via TextResourceFactory.
Original description
The description as published by the source.
In Gradle before version 7.0, files created with open permissions in the system temporary directory can allow an attacker to access information downloaded by Gradle. Some builds could be vulnerable to a local information disclosure. Remote files accessed through TextResourceFactory are downloaded into the system temporary directory first. Sensitive information contained in these files can be exposed to other local users on the same system. If you do not use the TextResourceFactory API, you are not vulnerable. As of Gradle 7.0, uses of the system temporary directory have been moved to the Gradle User Home directory. By default, this directory is restricted to the user running the build. As a workaround, set a more restrictive umask that removes read access to other users. When files are created in the system temporary directory, they will not be accessible to other users. If you are unable to change your system's umask, you can move the Java temporary directory by setting the System Property java.io.tmpdir. The new path needs to limit permissions to the build user only.
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2021-29429 has been found in Gradle.
Attackers can target a specific entry point like TextResourceFactory over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 4.0/10.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "Gradle CVE-2021-29429" on the vendor's site.
CVE-2021-29429 (Gradle) — CWE-377 / CVSS v3 4.0
Attack vector: local / unauthenticated / no user interaction
Attack surface: TextResourceFactory / java.io.tmpdir
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-377) exists in Gradle. Attackers reach the vulnerable code path via TextResourceFactory without authentication.
Check the vendor advisory for the affected versions of Gradle. Attack surface: TextResourceFactory / java.io.tmpdir.
Severity: Medium (CVSS 4.0/10). Risk of unauthorized operations or information disclosure.
Update to the patched release per vendor advisory.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'Gradle' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'Gradle' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
Gradleを grep し、稼働しているサービス・バージョンを把握する。 -
2Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory docs.gradle.org
- advisory github.com
- web nvd.nist.gov