USPR-13877: force org.apache.logging.log4j minimum version to 2.25.5 - #405
Merged
Conversation
…HSA-qv9r-c865-cp47) Force log4j-api and log4j-core to >= 2.25.5 to resolve Dependabot alert #133. Adds resolutionStrategy override in root build.gradle and ext[] lockstep in both Spring Boot example modules to account for BOM re-assertion. Co-Authored-By: Catarina Pinheiro Correia <catarina.correia@getyourguide.com>
catarina-correia
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context & Problem
GitHub Dependabot alert #133 flags org.apache.logging.log4j:log4j-api (pulled in transitively, not directly declared) for GHSA-qv9r-c865-cp47. The vulnerability affects improper encoding of non-finite floating-point values during MapMessage JSON serialization. The vulnerable range is >= 2.13.1, < 2.25.5, and the fix is to force >= 2.25.5.
See USPR-13877.
Solution
The fix adds a new resolutionStrategy override in the root build.gradle's
subprojects { configurations.configureEach { resolutionStrategy.eachDependency { } } }block, following the established pattern used for jackson, logback, tomcat-embed-core, netty, and spring-core. The override forces org.apache.logging.log4j (group match, covers log4j-api, log4j-core, and log4j-to-slf4j) to >= 2.25.5.Additionally, per the repo's Mechanism B lockstep requirement (Spring Boot BOM re-assertion in dependency-management-plugin modules), ext['log4j2.version'] = '2.25.5' is set in both example build files that apply the spring.dependency.management plugin:
This ensures the fix applies consistently across all modules.
Verification
🔍 Braintrust trace