CVE-2021-32751

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-32751
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-32751.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2021-32751
Aliases
Related
Published
2021-07-20T23:15:37Z
Modified
2024-10-12T07:45:27.831475Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

Gradle is a build tool with a focus on build automation. In versions prior to 7.2, start scripts generated by the application plugin and the gradlew script are both vulnerable to arbitrary code execution when an attacker is able to change environment variables for the user running the script. This may impact those who use gradlew on Unix-like systems or use the scripts generated by Gradle in thieir application on Unix-like systems. For this vulnerability to be exploitable, an attacker needs to be able to set the value of particular environment variables and have those environment variables be seen by the vulnerable scripts. This issue has been patched in Gradle 7.2 by removing the use of eval and requiring the use of the bash shell. There are a few workarounds available. For CI/CD systems using the Gradle build tool, one may ensure that untrusted users are unable to change environment variables for the user that executes gradlew. If one is unable to upgrade to Gradle 7.2, one may generate a new gradlew script with Gradle 7.2 and use it for older versions of Gradle. Fpplications using start scripts generated by Gradle, one may ensure that untrusted users are unable to change environment variables for the user that executes the start script. A vulnerable start script could be manually patched to remove the use of eval or the use of environment variables that affect the application's command-line. If the application is simple enough, one may be able to avoid the use of the start scripts by running the application directly with Java command.

References

Affected packages

Debian:11 / gradle

Package

Name
gradle
Purl
pkg:deb/debian/gradle?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

4.*

4.4.1-13
4.4.1-14
4.4.1-15
4.4.1-16
4.4.1-17
4.4.1-18
4.4.1-19
4.4.1-20

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / gradle

Package

Name
gradle
Purl
pkg:deb/debian/gradle?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

4.*

4.4.1-18
4.4.1-19
4.4.1-20

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / gradle

Package

Name
gradle
Purl
pkg:deb/debian/gradle?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

4.*

4.4.1-18
4.4.1-19
4.4.1-20

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Git / github.com/gradle/gradle

Affected ranges

Type
GIT
Repo
https://github.com/gradle/gradle
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

REL-0.*

REL-0.8
REL-0.9-preview-1
REL-0.9-preview-2
REL-0.9-preview-3
REL-0.9-rc-1

REL_0.*

REL_0.9
REL_0.9-rc-2
REL_0.9-rc-3
REL_0.9.1
REL_0.9.2

REL_1.*

REL_1.0
REL_1.0-milestone-1
REL_1.0-milestone-2
REL_1.0-milestone-3
REL_1.0-milestone-4
REL_1.0-milestone-5
REL_1.0-milestone-6
REL_1.0-milestone-7
REL_1.0-milestone-8
REL_1.0-milestone-8a
REL_1.0-milestone-9
REL_1.0-rc-1
REL_1.0-rc-2
REL_1.0-rc-3
REL_1.1
REL_1.1-rc-1
REL_1.1-rc-2
REL_1.10
REL_1.10-rc-1
REL_1.10-rc-2
REL_1.11
REL_1.11-rc-1
REL_1.12
REL_1.12-rc-1
REL_1.12-rc-2
REL_1.2
REL_1.2-rc-1
REL_1.3
REL_1.3-rc-1
REL_1.3-rc-2
REL_1.4
REL_1.4-rc-1
REL_1.4-rc-2
REL_1.4-rc-3
REL_1.5
REL_1.5-rc-1
REL_1.5-rc-2
REL_1.5-rc-3
REL_1.6
REL_1.6-rc-1
REL_1.7
REL_1.7-rc-1
REL_1.7-rc-2
REL_1.8
REL_1.8-rc-1
REL_1.8-rc-2
REL_1.9
REL_1.9-rc-1
REL_1.9-rc-2
REL_1.9-rc-3
REL_1.9-rc-4

REL_2.*

REL_2.0
REL_2.0-rc-1
REL_2.0-rc-2
REL_2.1
REL_2.1-rc-1
REL_2.1-rc-2
REL_2.1-rc-3
REL_2.1-rc-4
REL_2.10
REL_2.10-rc-1
REL_2.10-rc-2
REL_2.11
REL_2.11-rc-1
REL_2.11-rc-2
REL_2.11-rc-3
REL_2.12
REL_2.12-rc-1
REL_2.13
REL_2.13-rc-1
REL_2.13-rc-2
REL_2.14
REL_2.14-rc-1
REL_2.14-rc-2
REL_2.14-rc-3
REL_2.14-rc-4
REL_2.14-rc-5
REL_2.14-rc-6
REL_2.14.1
REL_2.14.1-rc-1
REL_2.14.1-rc-2
REL_2.2
REL_2.2-rc-1
REL_2.2-rc-2
REL_2.2.1
REL_2.2.1-rc-1
REL_2.3
REL_2.3-rc-1
REL_2.3-rc-2
REL_2.3-rc-3
REL_2.3-rc-4
REL_2.4
REL_2.4-rc-1
REL_2.4-rc-2
REL_2.5
REL_2.5-rc-1
REL_2.5-rc-2
REL_2.6
REL_2.6-rc-1
REL_2.6-rc-2
REL_2.7
REL_2.7-rc-1
REL_2.7-rc-2
REL_2.8
REL_2.8-rc-1
REL_2.8-rc-2
REL_2.9
REL_2.9-rc-1

REL_3.*

REL_3.0
REL_3.0-milestone-1
REL_3.0-milestone-2
REL_3.0-rc-1
REL_3.0-rc-2
REL_3.1
REL_3.1-rc-1
REL_3.2
REL_3.2-rc-1
REL_3.2-rc-2
REL_3.2-rc-3
REL_3.2.1
REL_3.3
REL_3.3-rc-1
REL_3.4
REL_3.4-rc-2
REL_3.4-rc-3
REL_3.4.1
REL_3.5
REL_3.5-rc-1
REL_3.5-rc-2
REL_3.5-rc-3
REL_3.5.1

REL_4.*

REL_4.0
REL_4.0-milestone-1
REL_4.0-milestone-2
REL_4.0-rc-1
REL_4.0-rc-2
REL_4.0-rc-3
REL_4.0.1
REL_4.0.2
REL_4.1
REL_4.1-milestone-1
REL_4.1-rc-1
REL_4.1-rc-2
REL_4.2
REL_4.2-rc-1
REL_4.2-rc-2
REL_4.2.1
REL_4.3
REL_4.3-rc-1
REL_4.3-rc-2
REL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