Skip to content

GHSA-cvx5-7vc7-rg77 CVE-2003-0043

Tomcat uses trusted privileges when processing web.xml file

Medium Maven
Severity
Medium
The publisher's own rating, not a CVSS score
Exploit chance (EPSS)
4.51%
Chance of exploitation in the next 30 days. Higher than 91.52% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-250 Execution with Unnecessary Privileges
Fix
3.3.1a
Upgrade org.apache.tomcat:tomcat to this version or later

Description

Jakarta Tomcat before 3.3.1a, when used with JDK 1.3.1 or earlier, uses trusted privileges when processing the web.xml file, which could allow remote attackers to read portions of some files through the web.xml file.

Affected versions

Maven

PackageVulnerableFixed in
org.apache.tomcat:tomcat
< 3.3.1a
3.3.1a

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.apache.tomcat:tomcat Maven → 3.3.1a

maven
<dependency><groupId>org.apache.tomcat</groupId><artifactId>tomcat</artifactId><version>3.3.1a</version></dependency>
gradle
implementation("org.apache.tomcat:tomcat:3.3.1a")

Weakness

CWE-250: Execution with Unnecessary Privileges

The product performs an operation at a privilege level that is higher than the minimum level required, which creates new weaknesses or amplifies the consequences of other weaknesses.

How to prevent it
  • Architecture and Design, Operation: Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
  • Architecture and Design: Identify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code [REF-76]. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators.
  • Architecture and Design: Identify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code [REF-76]. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators.
  • Implementation: Perform extensive input validation for any privileged code that must be exposed to the user and reject anything that does not fit your strict requirements.
  • Implementation: When dropping privileges, ensure that they have been dropped successfully to avoid CWE-273. As protection mechanisms in the environment get stronger, privilege-dropping calls may fail even if it seems like they would always succeed.
  • Implementation: If circumstances force you to run with extra privileges, then determine the minimum access level necessary. First identify the different permissions that the software and its users will need to perform their actions, such as file read and write permissions, network socket permissions, and so forth. Then explicitly allow those actions while denying all else [REF-76]. Perform extensive input validation and canonicalization to minimize the chances of introducing a separate vulnerability. This mitigation is much more prone to error than dropping the privileges in the first place.
  • Operation, System Configuration: Ensure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-69r9-qgr7-g2wj
Apache Tomcat Missing Encryption of Sensitive Data vulnerability
High Known exploited Also affects org.apache.tomcat:tomcat
GHSA-h3x4-894j-xpx5
Apache Tomcat's FORM authentication process has an Incorrect Authorization vulnerability
Critical Also affects org.apache.tomcat:tomcat
GHSA-9xv2-5v5q-p794
Apache Tomcat's DIGEST authenticator has an Authentication Bypass by Capture-replay vulnerability
Critical Also affects org.apache.tomcat:tomcat
GHSA-gcx9-497g-6cp6
Apache Tomcat has an Improper Access Control, Incorrect Authorization vulnerability
Critical Also affects org.apache.tomcat:tomcat
GHSA-5m62-pw8w-7w9f
Apache Tomcat - Security constraints not correctly applied
Critical Also affects org.apache.tomcat:tomcat
GHSA-9m89-8frq-c98c
Apache Tomcat - AJP secret compared in non-constant time
Low Also affects org.apache.tomcat:tomcat
GHSA-5mp6-jrq3-r938
Apache Tomcat: LockOutRealm treats user names as case-sensitive
High Also affects org.apache.tomcat:tomcat
GHSA-h6fc-48rj-7qqh
Apache Tomcat - Digest authenticator will authenticate any unknown user
Critical Also affects org.apache.tomcat:tomcat
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