Security readout for executives and security teams
Plain-English summary
Gradle-generated Unix scripts could run attacker-controlled code if a lower-privileged user can influence environment variables seen by the script runner. The main business risk is compromised build or application startup environments, especially CI/CD, not broad unauthenticated internet exposure.
Executive priority
Treat as a high-priority build and deployment hygiene issue where untrusted users share CI/CD or runtime control. Prioritize systems where build scripts run with privileged credentials, release signing access, or deployment permissions.
Technical view
Gradle before 7.2 produced vulnerable gradlew and application-plugin start scripts on Unix-like systems. Use of eval allowed environment-variable influence to become arbitrary command execution. Gradle 7.2 patched this by removing eval and requiring bash. The issue maps to CWE-78 and is rated CVSS 7.5 high.
Likely exposure
Exposure is most likely where teams run Gradle wrappers or Gradle-generated start scripts on Unix-like hosts, especially CI/CD systems or shared environments where untrusted users can set environment variables for the executing account.
Exploitation context
The source bundle does not show known active exploitation, and the CVE is not marked KEV. Exploitation requires control over particular environment variables visible to the vulnerable script, so risk depends on process isolation and CI/CD permissions.
Researcher notes
The key validation question is whether attacker-controlled environment variables can reach vulnerable Unix shell scripts. CVSS is high, but exploitability is gated by environment control. Sources name patch and workarounds but do not provide evidence of exploitation in the wild.
Mitigation direction
- Upgrade Gradle to version 7.2 or later.
- Regenerate gradlew using Gradle 7.2 if full upgrade is not immediately possible.
- Prevent untrusted users from changing environment variables for script-running accounts.
- Patch generated start scripts to remove eval where upgrade is delayed.
- Run simple applications directly with Java if start scripts are unnecessary.
Validation and detection
- Inventory repositories using gradlew from Gradle versions before 7.2.
- Identify Unix-like deployments using Gradle application-plugin generated start scripts.
- Review CI/CD permissions for who can set build environment variables.
- Check whether vulnerable scripts still contain eval-dependent command construction.
- Confirm remediation by comparing regenerated scripts against Gradle 7.2 behavior.
Public sources used
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
CWE-78: Command execution behavior lookup
Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Open ATT&CK lookupExecution behavior lookup
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
Open ATT&CK lookupCVE-2021-32751 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- High
- CVSS
- 7.5 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H1.65.9Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
7.5HighVector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Source materials
- CVE List V5 sourceCVE List V5
- https://github.com/gradle/gradle/security/advisories/GHSA-6j2p-252f-7mw8CVE reference · x_refsource_CONFIRM
- https://medium.com/dot-debug/the-perils-of-bash-eval-cc5f9e309caeCVE reference · x_refsource_MISC
- https://mywiki.wooledge.org/BashFAQ/048CVE reference · x_refsource_MISC
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
