PT-2026-162530

Published

2026-11-20

·

Updated

2026-11-20

Description by

Score
N/A
Not available

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.

Impact

A Gradle [version catalog](https://docs.gradle.org/current/userguide/version catalogs.html) declares the versions, dependency coordinates and plugin ids a build uses. A build defines its own catalogs in gradle/libs.versions.toml, in other TOML files or in the settings script, and can import catalogs published to a repository. Gradle generates type-safe accessors for each catalog, such as libs.guava, by generating Java source, compiling it, and loading it while the settings are evaluated. This advisory is about a vulnerability in the generation of version catalog accessors.
Gradle writes catalog values into the generated source without escaping them. A version, dependency coordinate or plugin id crafted for this adds code to the accessor classes, and that code runs when Gradle loads the catalog, with the privileges of the user running the build. It runs in every build that imports or defines the catalog, before any build script, including when an IDE synchronizes the project, even when the build uses none of the catalog's entries. This can expose the secrets available to the build, including repository and publishing credentials. This has been demonstrated with a proof-of-concept. This advisory does not publish the proof-of-concept.
Builds that import a published version catalog are the most at risk. Its publisher, or anyone able to publish a version of it that the build resolves, can run code in the build, while importing a catalog is expected to run no code. Dependency verification does not prevent this when it accepts the catalog version that carries the payload. Users who review an untrusted project before building it or opening it in an IDE are also at risk, since the code is in a catalog file and not in a build script. Commands that evaluate no settings, such as gradle --version, are not affected.
The attacker does not need access to the machine running the build: publishing a catalog the build imports is enough.

Patches

Gradle now rejects version catalog entries that contain */ or u. This covers versions (including strict, preferred and rejected versions, and branches), groups, names and plugin ids. The build fails while the catalog is loaded, before any accessor is generated, with a problem such as In version catalog libs, on alias 'example' version '…' contains '*/', which is not allowed. Gradle also escapes these sequences in other text it copies into the generated accessors, such as a catalog's description. No valid version, coordinate or plugin id contains them, so valid catalogs are not affected.
Fix versionAvailability
9.9.1OSS
9.8.3Gradle Security Subscription
9.7.3Gradle Security Subscription
9.6.3Gradle Security Subscription
9.5.3Gradle Security Subscription
9.4.3Gradle Security Subscription
9.3.3Gradle Security Subscription
9.2.3Gradle Security Subscription
8.14.7OSS
7.6.8Gradle Security Subscription

Workarounds

Upgrading Gradle is our recommended fix.
If you cannot upgrade immediately:
  • Check the values of every version catalog a build imports or defines. This covers gradle/libs.versions.toml, other catalog files, catalogs defined in the settings script, and the TOML file of each published catalog the settings script imports. No valid version, group, name or plugin id contains */ or u; do not build, or open in an IDE, a project whose catalogs contain them. For local files:
grep -rn -e '*/' -e 'u' --include='*.toml' .
  • Import published catalogs at a fixed, checked version. Do not import a catalog with a dynamic version (1.+, latest.release) or a changing one (-SNAPSHOT), which picks up new content with no change to the build. With [dependency verification](https://docs.gradle.org/current/userguide/securing dependencies.html), a different file published under the checked version then fails the build.

Forensics

Gradle keeps the source it generates for catalog accessors in the Gradle user home, under caches/<Gradle version>/dependencies-accessors/. A value that adds code shows as text after the end of a comment, */, on a line of that source:
grep -rnE '/.[^[:space:]]' ~/.gradle/caches/*/dependencies-accessors/
The catalog files themselves, and their history in version control, show the same values.
After upgrading, a build that fails with … contains '*/', which is not allowed or … contains 'u', which is not allowed declares a catalog carrying a payload.
[!IMPORTANT] The lack of such traces cannot be used to conclude no such attack was performed. Their presence is not a confirmation that an attack happened, but an indication that more investigations are needed.

References

More about this type of vulnerabilities:
Vendors
Affected products
Related identifiers
DHI-DX72-J3IZ-EOCM-V5IV
Found an issue in the description? Have something to add? Feel free to write us 👾