Upgrade commons-lang3 to 3.18.0 to fix CVE (Uncontrolled Recursion) #5012
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.
Summary
This PR upgrades
commons-lang3from 3.17.0 to 3.18.0 to fix a High Severity security vulnerability.Vulnerability Details
Description
Uncontrolled recursion occurs when a function calls itself repeatedly without proper termination conditions, which can lead to:
Affected Dependency Paths
The vulnerability was introduced through multiple transitive dependency paths:
org.apache.tika:tika-parsers-standard-package→tika-parser-code-module→[email protected]com.azure:azure-spring-data-cosmos→[email protected]io.rest-assured:json-path→rest-assured-common→[email protected]Affected Modules (24 modules with compile-scope dependency)
The following modules had
commons-lang3as a compile dependency:spring-ai-tika-document-readerspring-ai-azure-cosmos-db-storespring-ai-cassandra-storespring-ai-weaviate-storespring-ai-milvus-storespring-ai-anthropicspring-ai-elevenlabsspring-ai-model-chat-memory-repository-cosmos-dbspring-ai-spring-boot-docker-composespring-ai-spring-boot-testcontainersspring-ai-autoconfigure-vector-store-weaviatespring-ai-autoconfigure-vector-store-milvusspring-ai-autoconfigure-vector-store-cassandraspring-ai-autoconfigure-vector-store-azure-cosmos-dbspring-ai-autoconfigure-model-anthropicspring-ai-autoconfigure-model-elevenlabsspring-ai-autoconfigure-model-chat-memory-repository-cosmos-dbspring-ai-starter-vector-store-azure-cosmos-dbspring-ai-starter-vector-store-cassandraspring-ai-starter-vector-store-milvusspring-ai-starter-vector-store-weaviatespring-ai-starter-model-anthropicspring-ai-starter-model-elevenlabsspring-ai-starter-model-chat-memory-repository-cosmos-dbMany additional modules had the dependency in test scope.
Solution Approach
Why Parent POM vs Per-Module?
The fix is applied in the parent pom.xml
dependencyManagementsection rather than in individual modules because:Verification
Snyk scan after the fix shows no
commons-lang3vulnerabilities.