CVE-2007-3383: Apache Tomcat SendMailServlet XSS

org.apache.tomcat:tomcat Updated 02 Oct 2025

Summary

01/05/2022
No i
Moderate
Not published

CVE-2007-3383: Apache Tomcat SendMailServlet XSS. Affects org.apache.tomcat:tomcat across 2 version ranges.

>= 4.0.0, <= 4.0.6 >= 4.1.0, <= 4.1.36

No fix is published. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache Tomcat is an open-source web server and servlet container that is used to execute Java servlets and render web pages that include Java Server Page (JSP) code. It provides a Java-based HTTP web server environment for running Java code. The SendMailServlet is a part of the examples web application in Apache Tomcat, which allows users to send emails through a web interface. However, a cross-site scripting (XSS) vulnerability exists in the SendMailServlet, specifically in the sendmail.jsp file. This vulnerability affects Apache Tomcat versions 4.0.0 through 4.0.6 and 4.1.0 through 4.1.36.

Vulnerability Detail

The XSS vulnerability in SendMailServlet allows remote attackers to inject arbitrary web script or HTML into the application. This can occur when the attacker manipulates the 'From' field or other related fields, leading to the generation of error messages that include the injected code. If successfully exploited, this vulnerability can enable various attacks, such as session hijacking, defacement of web pages, or stealing sensitive information from users.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can modify the affected sendmail.jsp file to sanitize user input and prevent the execution of injected code. Here is an example of how to sanitize the 'From' field using Java code:

String from = request.getParameter("from");
from = from.replaceAll("<", "&lt;").replaceAll(">", "&gt;");

This code replaces the '<' and '>' characters with their HTML entity equivalents, preventing the execution of any injected HTML or script tags.

Conclusion

The XSS vulnerability in Apache Tomcat's SendMailServlet can allow remote attackers to inject arbitrary web script or HTML into the application, potentially leading to various security risks. It is crucial to upgrade to a non-vulnerable version of Apache Tomcat and implement proper input sanitization to mitigate this vulnerability. For further assistance and support in vulnerability remediation, please contact 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 web pages that include Java Server Page (JSP) code.

The SendMailServlet is a part of the examples web application in Apache Tomcat, which allows users to send emails through a web interface.

Cross-site scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users.

If successfully exploited, this vulnerability can enable various attacks, such as session hijacking, defacement of web pages, or stealing sensitive information from users.

To protect your application, it is recommended to upgrade to a version of Apache Tomcat that is not affected by this issue and to review and sanitize user input to prevent the injection of malicious code.

Related vulnerabilities

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

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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