CVE-2018-1304: Vulnerability in org.apache.tomcat.embed:tomcat-embed-core

Summary

17/10/2018
Yes i
Moderate
5.9

CVE-2018-1304: Apache Tomcat unauthorized access vulnerability. Affects org.apache.tomcat.embed:tomcat-embed-core across 4 version ranges.

>= 7.0.0, < 7.0.86 >= 8.0.0, < 8.0.51 >= 8.5.0, < 8.5.28 >= 9.0.0, < 9.0.5

Fixed in 4 releases; the minimum fixed version depends 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 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

The org.apache.tomcat.embed:tomcat-embed-core package is a part of Apache Tomcat, an open-source web server and servlet container. It provides the core functionality for embedding Tomcat into other applications. This package is widely used in Java-based web applications to handle HTTP requests and serve web content.

Vulnerability Detail

The vulnerability identified as CVE-2018-1304 affects the org.apache.tomcat.embed:tomcat-embed-core package. It arises from an issue in handling the URL pattern of the empty string, which maps to the context root. This flaw was present in Apache Tomcat versions 9.0.0.M1 to 9.0.4, 8.5.0 to 8.5.27, 8.0.0.RC1 to 8.0.49, and 7.0.0 to 7.0.84 when used in security constraint definitions. As a result, security constraints with an empty string URL pattern were ignored, allowing unauthorized users to access protected web application resources. This vulnerability has a CVSS score of 5.9, indicating a moderate severity level.

How To Fix

Fixed versions by release line

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

  • >= 7.0.0, < 7.0.86 7.0.86
  • >= 8.0.0, < 8.0.51 8.0.51
  • >= 8.5.0, < 8.5.28 8.5.28
  • >= 9.0.0, < 9.0.5 9.0.5

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

Workaround

If upgrading to a fixed version is not immediately feasible, a temporary workaround can be implemented by modifying the security constraint definitions to use a non-empty URL pattern instead of the empty string. This will ensure that the constraints are properly applied and unauthorized access to protected resources is prevented. Here is an example of how the security constraint definition can be modified:

Before:

<security-constraint>
  <web-resource-collection>
    <web-resource-name>Protected Resources</web-resource-name>
    <url-pattern></url-pattern>
  </web-resource-collection>
  <auth-constraint>
    <role-name>admin</role-name>
  </auth-constraint>
</security-constraint>

After:

<security-constraint>
  <web-resource-collection>
    <web-resource-name>Protected Resources</web-resource-name>
    <url-pattern>/protected/*</url-pattern>
  </web-resource-collection>
  <auth-constraint>
    <role-name>admin</role-name>
  </auth-constraint>
</security-constraint>

Conclusion

In conclusion, the org.apache.tomcat.embed:tomcat-embed-core package is vulnerable to CVE-2018-1304, which allows unauthorized access to protected web application resources. It is crucial to upgrade to the fixed versions or apply the provided workaround to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.tomcat.embed:tomcat-embed-core →

Share this vulnerability

FAQ

This vulnerability allows unauthorized users to bypass security constraints and gain access to web application resources that should be protected. It can lead to unauthorized disclosure of sensitive information or unauthorized modification of data.

The vulnerability affects Apache Tomcat versions 9.0.0.M1 to 9.0.4, 8.5.0 to 8.5.27, 8.0.0.RC1 to 8.0.49, and 7.0.0 to 7.0.84.

Yes, upgrading to the fixed versions of the org.apache.tomcat.embed:tomcat-embed-core package will address this vulnerability. The fixed versions are 9.0.5, 8.5.28, 8.0.51, and 7.0.86.

Yes, a temporary workaround is to modify the security constraint definitions to use a non-empty URL pattern instead of the empty string. This will ensure that the constraints are properly enforced.

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.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.tomcat.embed:tomcat-embed-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

Fixed versions by release line

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

  • >= 7.0.0, < 7.0.86 7.0.86
  • >= 8.0.0, < 8.0.51 8.0.51
  • >= 8.5.0, < 8.5.28 8.5.28
  • >= 9.0.0, < 9.0.5 9.0.5

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