Skip to content

fix(deps): update guava to 33.7.2-jre with variant resolution - #704

Open
Naenyn wants to merge 3 commits into
uPortal-Project:masterfrom
Naenyn:chore/handle-guava-variants
Open

Naenyn wants to merge 3 commits into
uPortal-Project:masterfrom
Naenyn:chore/handle-guava-variants

Conversation

@Naenyn

@Naenyn Naenyn commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Update: this PR now goes to guava 33.7.2-jre (not 32.1.3-jre) to fix GHSA-xxph-c9ww-hj94 / CVE-2026-102554 (high severity). Guava >= 4.0, <= 33.7.1 is affected: native deserialization of CompactHashMap, CompactHashSet and MapMakerInternalMap allocates memory based on an attacker-controlled size. 33.7.2 is the first patched release. 32.1.3 was still in the vulnerable range.

This supersedes #724 (Renovate's guava 33.7.2 bump). That PR fails CI because Gradle 6.9 can't choose between guava's android and standard-jvm variants, which is exactly what the org.gradle.jvm.environment = standard-jvm attribute below fixes.

Verified locally (Java 11, Gradle wrapper 6.9.4): ./gradlew check -S --no-daemon --no-parallel → BUILD SUCCESSFUL, 4/4 tests pass. dependencyInsight shows guava:33.7.2-jre on compile and runtime classpaths, including the transitive requests from springfox-swagger2 2.9.2 (guava:20.0) and resource-server-utils 1.5.3 (guava:32.0.0-android). The WAR ships guava-33.7.2-jre.jar (plus failureaccess and the empty listenablefuture). Not verified at runtime in a portal; springfox's Swagger endpoint is the main transitive Guava consumer worth a smoke test.


Guava 32.1+ publishes Gradle Module Metadata with two variants (android / standard-jvm) distinguished by the
org.gradle.jvm.environment attribute. Gradle 6.x cannot resolve this automatically, causing 'cannot choose between variants' failures.

Add a configurations.all attribute declaration to prefer standard-jvm (the JRE variant), which restores resolution and allows the guava bump from 32.0.0-jre to 32.1.3-jre.

Closes GH-673

Guava 32.1+ publishes Gradle Module Metadata with two variants
(android / standard-jvm) distinguished by the
org.gradle.jvm.environment attribute. Gradle 6.x cannot resolve this
automatically, causing 'cannot choose between variants' failures.

Add a configurations.all attribute declaration to prefer standard-jvm
(the JRE variant), which restores resolution and allows the guava
bump from 32.0.0-jre to 32.1.3-jre.

Closes uPortal-ProjectGH-673
@Naenyn
Naenyn requested a review from bjagg August 21, 2026 19:47
Resolve conflict in gradle.properties.
Guava <= 33.7.1 is affected by CVE-2026-102554 (deserialization of
CompactHashMap/CompactHashSet/MapMakerInternalMap allocates unbounded
memory). 33.7.2 is the first patched release. The standard-jvm variant
attribute added earlier in this branch is what lets Gradle 6.9 resolve it.
@Naenyn Naenyn changed the title fix(deps): update guava to 32.1.3-jre with variant resolution fix(deps): update guava to 33.7.2-jre with variant resolution Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant