Gradle shipped 9.9.1 and 8.14.7 on 10 November 2026 with fixes for three security advisories. The most serious one, rated Critical, lets a crafted value in a version catalog run code as soon as Gradle loads the catalog. That happens before any build script runs, and even when an IDE only syncs the project. If you build Java, Kotlin or Android projects, this guide explains what is affected, how to upgrade, and how to check your repositories and machines, using the official advisories.
The three advisories
- Version catalog values run as code in generated accessors (GHSA-3cfg-jpcr-gfp3), Critical. Affects Gradle 7.0 through 8.14.6 and 9.0.0 through 9.9.0.
- Gradle client trusts the content of the daemon registry (GHSA-gqrr-4j89-5267), High.
- Daemon client trusts stale registry entries (port squatting), High. It is listed on the Gradle security advisories page.
Fixed open-source versions: 9.9.1 and 8.14.7. Customers with a Gradle Security Subscription also get patches for older 9.x lines and 7.6.8.
Advisory 1: how a version catalog becomes code
Version catalogs (gradle/libs.versions.toml, other TOML files, catalogs defined in settings, or catalogs published to a repository) declare versions, coordinates and plugin IDs. Gradle generates type-safe accessors such as libs.guava by writing Java source, compiling it and loading it while settings are evaluated.
The problem: Gradle wrote catalog values into that generated source without escaping them. A version, coordinate or plugin ID crafted for this can close a comment and add code to the accessor classes. That code runs:
- in every build that imports or defines the catalog, even if no entry is used
- before any build script runs
- during IDE sync
- with the privileges of the user running the build, so repository and publishing credentials can leak
The advisory says the issue has been demonstrated with a proof-of-concept, which is not published.
Who is most at risk
- Builds that import a published catalog. Anyone who can publish a version of that catalog that your build resolves can run code in your build. The advisory notes that dependency verification doesn’t help if it accepts the catalog version that carries the payload.
- Developers who review untrusted projects before building them, for example pull requests from forks. The payload lives in a TOML file, not in a build script you would normally read.
Commands that evaluate no settings, such as gradle --version, are not affected.
Step 1: Upgrade the wrapper
./gradlew :wrapper --gradle-version=9.9.1 && ./gradlew :wrapper
# the second run lets the new wrapper update its own files
./gradlew --version
Still on 8.x? Use --gradle-version=8.14.7. Commit the changed gradle/wrapper/gradle-wrapper.properties (and the wrapper jar and scripts, if they changed) so every developer and CI job picks it up. Remember to update any Gradle version pinned in CI images or in tools that don’t use the wrapper.
What the fix does
Gradle now rejects catalog entries containing */ or \u in versions (including strict, preferred and rejected versions, and branches), groups, names and plugin IDs. The build fails while loading the catalog, before any accessor is generated, with a message like:
In version catalog libs, on alias 'example' version '…' contains '*/', which is not allowed
No valid version, coordinate or plugin ID contains those sequences, so normal catalogs are not affected. If you see this error after upgrading, treat it as a security event: some catalog your build uses carries a payload.
Step 2: If you can’t upgrade today
The advisory recommends upgrading. Until you can:
Scan local catalog files:
grep -rn -e '\*/' -e '\\u' --include='*.toml' .
Pin published catalogs. Don’t import a catalog with a dynamic version (1.+, latest.release) or a changing one (-SNAPSHOT). Those pick up new content with no change to your build. With a fixed, checked version plus dependency verification, a different file published under that version fails the build.
Step 3: Look for traces on build machines
Gradle keeps the generated accessor source in the Gradle user home. A malicious value shows up as text after a comment end (*/) on a line:
grep -rnE '\*/.*[^[:space:]]' ~/.gradle/caches/*/dependencies-accessors/
Also review your catalog files and their history in version control. The advisory is clear that a clean result doesn’t prove nothing happened, and a hit isn’t proof of an attack. A hit means you should investigate, rotate credentials the build could reach, and review recent publishes.
Advisory 2: the daemon registry
Gradle clients (the gradle/gradlew CLI or an IDE using the Tooling API) find running daemons through a registry file. The org.gradle.daemon.registry.base property changes where that file lives, and it is honoured in a project’s gradle.properties. A malicious project could therefore ship its own registry file. Older clients deserialized parts of it with Java serialization, connected to any address listed in it (even remote hosts), and sent their environment variables and system properties there. When the client was an IDE, a crafted reply could make it load and run code from a jar URL chosen by the attacker.
The fixed versions stop using Java serialization for the registry, accept only address types Gradle writes, and connect only to addresses on the local machine. The advisory is explicit, though: upgrading does not make a project that sets org.gradle.daemon.registry.base safe. Before you run Gradle on, or open in an IDE, any untrusted repository:
# a project has no reason to set this
grep -n 'org.gradle.daemon.registry.base' gradle.properties
# no daemon registry should ever be committed
git ls-files | grep 'registry.bin$'
To check history, including deleted files:
git log --all -p -- '*gradle.properties' | grep 'org.gradle.daemon.registry.base'
git log --all --name-only --format= | grep 'registry.bin$'
A safe routine for reviewing outside code
These advisories share one lesson: opening a Gradle project is running code. For pull requests from forks and unfamiliar repos:
- Read
gradle.properties,settings.gradle(.kts), catalog TOML files and the wrapper properties before you build or open the project in an IDE. - Do untrusted builds in a disposable container or VM with no publishing credentials.
- In CI, don’t expose secrets to workflows triggered by forks, and keep Gradle up to date in your build images.
- Validate the wrapper jar (for example with Gradle’s wrapper validation action on GitHub) so a project can’t swap in a modified wrapper.
Also in 9.9.1
The release announcement also lists faster Kotlin DSL compilation, test filtering for non-method JUnit Platform tests, wrapper settings that are kept when you upgrade, and predefined groups in the Problems API. Read the 9.9.1 release notes for the full list.
Takeaway
Upgrade to Gradle 9.9.1 or 8.14.7 now, especially if your builds import published version catalogs or your team opens outside pull requests in an IDE. Pin catalog versions, scan TOML files and the accessor cache for */ and \u, and never run Gradle on a project that sets org.gradle.daemon.registry.base. Details: GHSA-3cfg-jpcr-gfp3 and GHSA-gqrr-4j89-5267.
