CVE-2018-14371: Path Traversal in Eclipse Mojarra

org.glassfish:mojarra-parent Updated 02 Oct 2025

Summary

14/05/2022
Yes i
High
7.5

CVE-2018-14371: Path Traversal in Eclipse Mojarra. Affects org.glassfish:mojarra-parent versions < 2.3.7. Fixed in 2.3.7. 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

Eclipse Mojarra is an open-source implementation of the JavaServer Faces (JSF) specification. It provides a framework for building web applications using Java and JSF. Mojarra is widely used in enterprise applications and offers various features for web development. However, a vulnerability has been discovered in Mojarra versions prior to 2.3.7 that allows for Directory Traversal attacks. This vulnerability can be exploited by a remote attacker to download configuration files or Java bytecodes from affected applications.

Vulnerability Detail

The vulnerability, identified as CVE-2018-14371, resides in the getLocalePrefix function in ResourceManager.java. It is caused by a lack of proper input validation on the 'loc' parameter, which can be manipulated by an attacker to traverse directories and access sensitive files. By exploiting this vulnerability, an attacker can retrieve configuration files or Java bytecodes, potentially leading to unauthorized access, information disclosure, or even remote code execution.

How To Fix

Minimum fixed version

2.3.7

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

If upgrading to the latest version of Mojarra is not immediately feasible, a temporary workaround can be implemented. This workaround involves implementing additional input validation on the 'loc' parameter to prevent directory traversal attacks. Here is an example of how this can be done in Java:

public String getLocalePrefix(String loc) {
    // Perform input validation to prevent directory traversal
    if (loc.contains("..") || loc.contains("/") || loc.contains("\\")) {
        throw new IllegalArgumentException("Invalid 'loc' parameter");
    }
    // Rest of the code
}

Conclusion

In conclusion, the vulnerability CVE-2018-14371 in Eclipse Mojarra allows for Directory Traversal attacks, enabling an attacker to download configuration files or Java bytecodes from affected applications. To mitigate this vulnerability, it is crucial to upgrade to Mojarra version 2.3.7 or later. Implementing proper input validation on the 'loc' parameter can provide an additional layer of protection. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.glassfish:mojarra-parent →

Share this vulnerability

FAQ

Eclipse Mojarra is an open-source implementation of the JavaServer Faces (JSF) specification. It provides a framework for building web applications using Java and JSF.

Directory Traversal is a vulnerability that allows an attacker to access files and directories outside of the intended scope. In the case of this vulnerability in Mojarra, it enables an attacker to download configuration files or Java bytecodes from affected applications.

The potential consequences of this vulnerability include unauthorized access to sensitive files, information disclosure, and remote code execution. An attacker could retrieve configuration files or Java bytecodes, which may contain sensitive information or allow them to execute arbitrary code on the affected system.

To mitigate the risk of exploitation, it is recommended to upgrade to Eclipse Mojarra version 2.3.7 or later. This version includes a fix for the Directory Traversal vulnerability. Additionally, implementing proper input validation on the 'loc' parameter can provide an extra layer of protection.

For more information about this vulnerability, you can refer to the official CVE entry: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14371

Related vulnerabilities

Recent vulnerabilities recorded for org.glassfish:mojarra-parent.

How To Fix

Minimum fixed version

2.3.7

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