Home / gradle / gradle / CVE-2025-27148
CVE-2025-27148: is it exploited, and which versions of gradle are affected and fixed?
CVE-2025-27148 is a creation of Temporary File With Insecure Permissions vulnerability in gradle. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 14:38 UTC). Affected: gradle = 8.12 (CVE record by GitHub_M). No fixed version is listed in the sources yet; check the vendor advisory. Severity: High (8.8, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 14:38 UTC, CVE record November 19, 2026, 07:09 UTC and NVD November 19, 2026, 07:22 UTC.
What is CVE-2025-27148?
Gradle vulnerable to local privilege escalation through system temporary directory
Gradle is a build automation tool, and its native-platform tool provides Java bindings for native APIs. 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. This library initialization could be vulnerable to a local privilege escalation from an attacker quickly deleting and recreating files in the system temporary directory. Gradle builds that rely on versions of net.rubygrapefruit:native-platform prior to 0.22-milestone-28 could be vulnerable to a local privilege escalation from an attacker quickly deleting and recreating files in the system temporary directory. In net.rubygrapefruit:native-platform prior to version 0.22-milestone-28, if the `Native.get(Class<>)` method was called, without calling `Native.init(File)` first, with a non-`null` argument used as working file path, then the library would initialize itself using the system temporary directory and NativeLibraryLocator.java lines 68 through 78. Version 0.22-milestone-28 has been released with changes that fix the problem. Initialization is now mandatory and no longer uses the system temporary directory, unless such a path is passed for initialization. The only workaround for affected versions is to make sure to do a proper initialization, using a location that is safe. Gradle 8.12, only that exact version, had codepaths where the initialization of the underlying native integration library took a default path, relying on copying the binaries to the system temporary directory. Any execution of Gradle exposed this exploit. Users of Windows or modern versions of macOS are not vulnerable, nor are users of a Unix-like operating system with the "sticky" bit set or `noexec` on their system temporary directory vulnerable. This problem was fixed in Gradle 8.12.1. Gradle 8.13 release also upgrades to a version of the native library that no longer has that bug. Some workarounds are available. On Unix-like operating systems, ensure that the "sticky" bit is set. This only allows the original user (or root) to delete a file. Mounting `/tmp` as `noexec` will prevent Gradle 8.12 from starting. Those who are are unable to change the permissions of the system temporary directory 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.
From the CVE record by GitHub_M, last updated February 25, 2025, 21:20 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| gradle | gradle | = 8.12 |
As the CVE record by GitHub_M states it, last updated February 25, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
How severe is CVE-2025-27148?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 8.8 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H | GitHub_M |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2025-27148 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: total (CISA ADP, February 25, 2025)
- EPSS
- 0.24% probability of exploitation activity in the next 30 days, percentile 15.5 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-378 Creation of Temporary File With Insecure Permissions
- CWE-379 Creation of Temporary File in Directory with Insecure Permissions
Where are the vendor advisories and references?
- https://github.com/gradle/gradle/security/advisories/GHSA-465q-w4mf-4f4r x_refsource_CONFIRM
- https://github.com/gradle/gradle/security/advisories/GHSA-89qm-pxvm-p336 x_refsource_MISC
- https://github.com/gradle/native-platform/security/advisories/GHSA-2xxp-vw2f-p3x8 x_refsource_MISC
- https://github.com/gradle/gradle/pull/32025 x_refsource_MISC
- https://github.com/gradle/native-platform/pull/353 x_refsource_MISC
- https://en.wikipedia.org/wiki/Fstab#Options_common_to_all_filesystems x_refsource_MISC
- https://en.wikipedia.org/wiki/Sticky_bit x_refsource_MISC
- https://github.com/gradle/native-platform/blob/574dfe8d9fb546c990436468d617ab81c140871d/native-platform/src/main/java/net/rubygrapefruit/platform/internal/NativeLibraryLocator.java#L68-L78 x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- February 19, 2025
- Published
- February 25, 2025, 20:13 UTC
- CVE record updated
- February 25, 2025, 21:20 UTC by GitHub_M
- NVD
- Deferred, last modified June 17, 2026, 09:03 UTC
- Last checked
- CVE list November 19, 2026, 07:09 UTC; NVD November 19, 2026, 07:22 UTC; KEV December 3, 2026, 14:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect gradle?
- Jan 16, 2026CVE-2026-22865 gradle: download of Code Without Integrity Check
- Jan 16, 2026CVE-2026-22816 gradle: inclusion of code from an untrusted source
- Oct 6, 2023CVE-2023-42445 gradle: XML external entity (XXE)
- Oct 5, 2023CVE-2023-44387 gradle: incorrect permissions on a critical resource
- Jun 30, 2023CVE-2023-35946 gradle: path traversal (reading or writing files outside the intended folder)
- Jun 30, 2023CVE-2023-35947 gradle: path traversal (reading or writing files outside the intended folder)
- Mar 2, 2023CVE-2023-26053 gradle: inclusion of code from an untrusted source
- Jul 14, 2022CVE-2022-31156 gradle: inclusion of code from an untrusted source
Questions about CVE-2025-27148
Is CVE-2025-27148 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 14:38 UTC. FIRST's EPSS gives it a 0.24% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of gradle are affected by CVE-2025-27148?
gradle = 8.12, per the CVE record by GitHub_M. The tables above give every range the sources list.
Which version fixes CVE-2025-27148?
None of the sources (the CVE record, the NVD and GitHub's reviewed advisories) lists a fixed version yet. Check the vendor's advisory in the references.
How severe is CVE-2025-27148?
High (8.8, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2025-27148?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.