Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-29429

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-29429
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 08:55 UTC · Revision 1

Source evidence

CVE-2021-29429

core-osv · Original source

Published 12 Apr 2021, 22:15 UTC

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.

osv:CVE-2021-29429
Complete source record
{
  "id": "c45c6e9dbf5f8bf4f1983f7dcf157924277eb81c1e4abef96676cde45cf34a19",
  "url": "https://osv.dev/vulnerability/CVE-2021-29429",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-29429",
    "summary": "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.",
    "evidence": "osv:CVE-2021-29429",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-29429",
      "aliases": [
        "BIT-gradle-2021-29429",
        "CVE-2021-29429",
        "GHSA-fp8h-qmr5-j4c8"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/gradle/gradle",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "d5661e3f0e07a8caff705f1badf79fb5df8022c4"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:gradle:gradle:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "7.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v7.0.0-RC2",
            "v7.0.0-RC1",
            "v7.0.0-M3",
            "v7.0.0-M2",
            "v7.0.0-M1",
            "v6.8.0-M3",
            "v6.8.0-M2",
            "v6.8.0-M1",
            "v6.6.0-M2",
            "v6.6.0-M1",
            "v6.5.0-M2",
            "v6.5.0-M1",
            "v6.1.0-M2",
            "v6.1.0-M1",
            "v3.0.0-M1",
            "REL_3.0-milestone-1",
            "v1.12.0-RC2",
            "v1.12.0",
            "v1.12-RC2",
            "v1.12",
            "REL_1.12-rc-2",
            "REL_1.12",
            "v1.12.0-RC1",
            "v1.12-RC1",
            "REL_1.12-rc-1",
            "v1.11.0",
            "v1.11",
            "REL_1.11",
            "v1.11.0-RC1",
            "v1.11-RC1",
            "REL_1.11-rc-1",
            "v1.0.0-M3",
            "v1.0-M3",
            "REL_1.0-milestone-3",
            "v1.0.0-M2",
            "v1.0-M2",
            "REL_1.0-milestone-2",
            "v1.0.0-M1",
            "v1.0-M1",
            "REL_1.0-milestone-1",
            "v0.9.2",
            "REL_0.9.2",
            "v0.9.1",
            "REL_0.9.1",
            "v0.9.0",
            "v0.9",
            "REL_0.9",
            "v0.9.0-RC3",
            "v0.9-RC3",
            "REL_0.9-rc-3",
            "v0.9.0-RC2",
            "v0.9-RC2",
            "REL_0.9-rc-2",
            "v0.9.0-RC1",
            "v0.9-RC1",
            "REL-0.9-rc-1",
            "REL-0.9-preview-3",
            "REL-0.9-preview-2",
            "REL-0.9-preview-1",
            "v0.8.0",
            "v0.8",
            "REL-0.8"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29429.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/quarkusio/quarkus",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "4af9c47bce990bff7168ef1fa79f591db0e03d31"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:quarkus:quarkus:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "2.2.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.2.3.Final"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29429.json"
          }
        }
      ],
      "modified": "2026-10-24T10:50:41.435817635Z",
      "provider": "osv",
      "references": [
        "https://docs.gradle.org/7.0/release-notes.html#security-advisories",
        "https://github.com/gradle/gradle/security/advisories/GHSA-fp8h-qmr5-j4c8"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-29429",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 442470,
  "published_at": "2021-04-12T22:15:13.32+00:00"
}