CVE-2012-4387: Denial of Service in Apache Struts

Summary

17/05/2022
Yes i
Moderate
Not published

CVE-2012-4387: Denial of service in Apache Struts. Affects org.apache.struts.xwork:xwork-core versions >= 2.0.0, < 2.3.4.1. Fixed in 2.3.4.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Apache Struts is a popular open-source framework for developing Java web applications. It provides a set of reusable components and a MVC (Model-View-Controller) architecture for building scalable and maintainable web applications. The Apache Struts 2.0.0 through 2.3.4 version is affected by a denial of service vulnerability that allows remote attackers to consume excessive CPU resources by sending a request with a long parameter name. This parameter name is processed as an OGNL (Object-Graph Navigation Language) expression, leading to the CPU consumption.

Vulnerability Detail

The vulnerability in Apache Struts allows an attacker to cause a denial of service by exploiting the way the framework handles long parameter names. By sending a specially crafted request with a long parameter name, an attacker can trigger the execution of an OGNL expression, which consumes excessive CPU resources. This can lead to a significant degradation in the performance of the affected server, potentially impacting the availability of the application. The vulnerability has a moderate severity rating and was first published on May 17, 2022.

How To Fix

Latest published version: 2.3.37 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.4.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. However, as a general best practice, it is recommended to implement proper input validation and sanitization techniques to mitigate the risk of similar vulnerabilities. By validating and sanitizing user input, developers can prevent the execution of malicious OGNL expressions and reduce the likelihood of a denial of service attack.

Conclusion

The denial of service vulnerability in Apache Struts can be mitigated by upgrading to the patched version of the framework. Developers should ensure that their project's dependencies are updated to use the fixed version of the 'org.apache.struts:struts2-core' package. Additionally, implementing proper input validation and sanitization techniques can help reduce the risk of similar vulnerabilities. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.struts.xwork:xwork-core →

Share this vulnerability

FAQ

Apache Struts is an open-source framework for developing Java web applications. It provides a set of reusable components and a MVC architecture for building scalable and maintainable web applications.

The vulnerability allows remote attackers to cause a denial of service by consuming excessive CPU resources. This can lead to a significant degradation in the performance of the affected server, potentially impacting the availability of the application.

To fix the vulnerability, it is recommended to upgrade the Apache Struts version to 2.3.4.1 or later. This version includes a fix for the denial of service vulnerability. Developers should update their project's dependencies to use the patched version of the 'org.apache.struts:struts2-core' package.

There is no specific workaround provided for this vulnerability. However, implementing proper input validation and sanitization techniques can help mitigate the risk of similar vulnerabilities.

You can find more information about this vulnerability in the CVE-2012-4387 advisory and the GitHub Security Advisory GHSA-hrgc-54mv-58gv.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.struts.xwork:xwork-core.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 2.3.37 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.4.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback