Skip to content

GHSA-wjjr-h4wh-w6vv CVE-2009-1190

Spring Framework Inefficient Regular Expression Complexity

Medium Maven
Severity
Medium
The publisher's own rating, not a CVSS score
Exploit chance (EPSS)
2.80%
Chance of exploitation in the next 30 days. Higher than 86.45% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-1333 Inefficient Regular Expression Complexity
Fix
3.0.0.RELEASE
Upgrade org.springframework:spring-core to this version or later

Description

Algorithmic complexity vulnerability in the java.util.regex.Pattern.compile method in Sun Java Development Kit (JDK) before 1.6, when used with spring.jar in SpringSource Spring Framework 1.1.0 through 2.5.6 and 3.0.0.M1 through 3.0.0.M2 and dm Server 1.0.0 through 1.0.2, allows remote attackers to cause a denial of service (CPU consumption) via serializable data with a long regex string containing multiple optional groups, a related issue to CVE-2004-2540.

Affected versions

Maven

PackageVulnerableFixed in
org.springframework:spring-core
>= 1.1.0, < 3.0.0.RELEASE
3.0.0.RELEASE

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

org.springframework:spring-core Maven → 3.0.0.RELEASE

maven
<dependency><groupId>org.springframework</groupId><artifactId>spring-core</artifactId><version>3.0.0.RELEASE</version></dependency>
gradle
implementation("org.springframework:spring-core:3.0.0.RELEASE")

Weakness

CWE-1333: Inefficient Regular Expression Complexity

The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.

How to prevent it
  • Architecture and Design: Use regular expressions that do not support backtracking, e.g. by removing nested quantifiers.
  • System Configuration: Set backtracking limits in the configuration of the regular expression implementation, such as PHP's pcre.backtrack_limit. Also consider limits on execution time for the process.
  • Implementation: Do not use regular expressions with untrusted input. If regular expressions must be used, avoid using backtracking in the expression.
  • Implementation: Limit the length of the input that the regular expression will process.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-659m-px2c-25wj
Spring Framework Denial of Service via AntPathMatcher
High Also affects org.springframework:spring-core
GHSA-jmp9-x22r-554x
Spring Framework annotation detection mechanism may result in improper authorization
High Also affects org.springframework:spring-core
GHSA-r4q3-7g4q-x89m
Spring Framework server Web DoS Vulnerability
High Also affects org.springframework:spring-core
GHSA-rfmp-97jj-h8m6
Improper Output Neutralization for Logs in Spring Framework
Medium Also affects org.springframework:spring-core
GHSA-wv88-pf73-x22p
Improper Neutralization of Directives in Dynamically Evaluated Code in Spring Framework
High Also affects org.springframework:spring-core
GHSA-f866-m9mv-2xr3
Spring Framework and Spring Security vulnerable to Deserialization of Untrusted Data
Medium Also affects org.springframework:spring-core
GHSA-rhcg-rwhx-qj3j
Improper Limitation of a Pathname to a Restricted Directory in Spring Framework
Medium Also affects org.springframework:spring-core
GHSA-6gf2-pvqw-37ph
Log entry injection in Spring Framework
Medium Also affects org.springframework:spring-core
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor