CVE-2012-4431: Cross-Site Request Forgery in Apache Tomcat

org.apache.tomcat:tomcat Updated 02 Oct 2025

Summary

17/05/2022
Yes i
Moderate
Not published

CVE-2012-4431: Cross-Site Request Forgery in Apache Tomcat. Affects org.apache.tomcat:tomcat across 2 version ranges.

>= 6.0.0, < 6.0.36 >= 7.0.0, < 7.0.32

Fixed in 6.0.36 or 7.0.32, depending on the release line you run. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Apache Tomcat is an open-source web server and servlet container that is used to execute Java servlets and render JavaServer Pages (JSPs). It provides a platform for running Java web applications. The vulnerability identified as CVE-2012-4431 affects Apache Tomcat versions 6.x before 6.0.36 and 7.x before 7.0.32. This vulnerability allows remote attackers to bypass the cross-site request forgery (CSRF) protection mechanism by sending a request that lacks a session identifier.

Vulnerability Detail

The vulnerability in Apache Tomcat arises from a flaw in the CsrfPreventionFilter.java file. This flaw enables remote attackers to bypass the CSRF protection mechanism implemented by the filter. By sending a request without a session identifier, attackers can trick the server into accepting the request as legitimate, potentially leading to unauthorized actions being performed on behalf of the attacker. This vulnerability has a moderate severity rating and is classified under CWE-352.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 6.0.0, < 6.0.36 6.0.36
  • >= 7.0.0, < 7.0.32 7.0.32

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a workaround, developers can implement additional CSRF protection measures in their applications. This can include using anti-CSRF tokens, validating the origin of requests, and ensuring that all requests contain a valid session identifier. Implementing these measures can help mitigate the risk of CSRF attacks even if the underlying vulnerability in Apache Tomcat is present.

Conclusion

The vulnerability identified as CVE-2012-4431 in Apache Tomcat allows remote attackers to bypass the CSRF protection mechanism. To mitigate this vulnerability, it is crucial to upgrade to the fixed versions of Apache Tomcat (6.0.36 or later for 6.x versions, and 7.0.32 or later for 7.x versions). Additionally, implementing additional CSRF protection measures in your applications can provide an extra layer of defense. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for org.apache.tomcat:tomcat →

Share this vulnerability

FAQ

Apache Tomcat is an open-source web server and servlet container that is used to execute Java servlets and render JavaServer Pages (JSPs). It provides a platform for running Java web applications.

Cross-Site Request Forgery (CSRF) is an attack that tricks the victim into submitting a malicious request. It occurs when an attacker can force a user to perform unwanted actions on a web application in which they are authenticated.

The vulnerability allows remote attackers to bypass the CSRF protection mechanism in Apache Tomcat. This can lead to unauthorized actions being performed on behalf of the attacker, potentially compromising the integrity and security of the affected web application.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities in software using just the pom.xml file.

You can find more information about this vulnerability, including its CVE identifier and fix details, in the GitHub Advisory Database (https://github.com/github/advisory-database).

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.tomcat:tomcat.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 6.0.0, < 6.0.36 6.0.36
  • >= 7.0.0, < 7.0.32 7.0.32

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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