Skip to content
Heist/ feed
Back to feed
High

gradle — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2021-29428

In Gradle before version 7.0, on Unix-like systems, the system temporary directory can be created with open permissions that allow multiple users to create and delete files within it. Gradle builds could be vulnerable to a local privilege escalation from an attacker quickly deleting and recreating files in the system temporary directory. This vulnerability impacted builds using precompiled script plugins written in Kotlin DSL and tests for Gradle plugins written using ProjectBuilder or TestKit. If you are on Windows or modern versions of macOS, you are not vulnerable. If you are on a Unix-like operating system with the "sticky" bit set on your system temporary directory, you are not vulnerable. The problem has been patched and released with Gradle 7.0. As a workaround, on Unix-like operating systems, ensure that the "sticky" bit is set. This only allows the original user (or root) to delete a file. If you are unable to change the permissions of the system temporary directory, 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. For additional details refer to the referenced GitHub Security Advisory.

Products
gradle
Affected versions
4.4.1-18, 4.4.1-19, 4.4.1-20, 4.4.1-21, 4.4.1-22, 4.4.1-23, 4.5.1-1, 4.6-1, 4.6-2, 4.6-3
Fixed versions
Not specified
CVEs
CVE-2021-29428
Confirmed fixed CVEs
Not specified
Updated in this feed
28 Oct 2026, 11:09 UTC · Revision 1

Source evidence

DEBIAN-CVE-2021-29428

core-osv · Original source

Published 13 Apr 2021, 20:15 UTC

In Gradle before version 7.0, on Unix-like systems, the system temporary directory can be created with open permissions that allow multiple users to create and delete files within it. Gradle builds could be vulnerable to a local privilege escalation from an attacker quickly deleting and recreating files in the system temporary directory. This vulnerability impacted builds using precompiled script plugins written in Kotlin DSL and tests for Gradle plugins written using ProjectBuilder or TestKit. If you are on Windows or modern versions of macOS, you are not vulnerable. If you are on a Unix-like operating system with the "sticky" bit set on your system temporary directory, you are not vulnerable. The problem has been patched and released with Gradle 7.0. As a workaround, on Unix-like operating systems, ensure that the "sticky" bit is set. This only allows the original user (or root) to delete a file. If you are unable to change the permissions of the system temporary directory, 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. For additional details refer to the referenced GitHub Security Advisory.

osv:DEBIAN-CVE-2021-29428

gradle

Fixed versions: Not specified

gradle

Fixed versions: Not specified

gradle

Fixed versions: Not specified

Complete source record
{
  "id": "7af79bfcd95b8cd242acd1fc6ed85ea684bd83d5eb11b16d1623b32c6b61611e",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2021-29428",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2021-29428",
    "summary": "In Gradle before version 7.0, on Unix-like systems, the system temporary directory can be created with open permissions that allow multiple users to create and delete files within it. Gradle builds could be vulnerable to a local privilege escalation from an attacker quickly deleting and recreating files in the system temporary directory. This vulnerability impacted builds using precompiled script plugins written in Kotlin DSL and tests for Gradle plugins written using ProjectBuilder or TestKit. If you are on Windows or modern versions of macOS, you are not vulnerable. If you are on a Unix-like operating system with the \"sticky\" bit set on your system temporary directory, you are not vulnerable. The problem has been patched and released with Gradle 7.0. As a workaround, on Unix-like operating systems, ensure that the \"sticky\" bit is set. This only allows the original user (or root) to delete a file. If you are unable to change the permissions of the system temporary directory, 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. For additional details refer to the referenced GitHub Security Advisory.",
    "evidence": "osv:DEBIAN-CVE-2021-29428",
    "products": [
      {
        "name": {
          "value": "gradle",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.4.1-18",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.4.1-19",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.4.1-20",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.4.1-21",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.4.1-22",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.4.1-23",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.5.1-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.6-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.6-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.6-3",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "gradle",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.4.1-22",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "4.4.1-23",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "4.5.1-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "4.6-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "4.6-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "4.6-3",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "gradle",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.4.1-22",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.4.1-23",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.5.1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.6-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.6-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.6-3",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2021-29428",
      "aliases": [
        "DEBIAN-CVE-2021-29428"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "gradle",
            "purl": "pkg:deb/debian/gradle?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "4.4.1-18",
            "4.4.1-19",
            "4.4.1-20",
            "4.4.1-21",
            "4.4.1-22",
            "4.4.1-23",
            "4.5.1-1",
            "4.6-1",
            "4.6-2",
            "4.6-3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-29428.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "gradle",
            "purl": "pkg:deb/debian/gradle?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "4.4.1-22",
            "4.4.1-23",
            "4.5.1-1",
            "4.6-1",
            "4.6-2",
            "4.6-3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-29428.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "gradle",
            "purl": "pkg:deb/debian/gradle?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "4.4.1-22",
            "4.4.1-23",
            "4.5.1-1",
            "4.6-1",
            "4.6-2",
            "4.6-3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-29428.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-09T10:01:05.235188564Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-29428"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2021-29428"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-29428",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 111741,
  "published_at": "2021-04-13T20:15:21.797+00:00"
}