/

CVE-2021-48015

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in JeeWMS File Download Handler

CVE-2021-48015

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Disclosure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An unauthenticated path traversal vulnerability in JeeWMS allows remote attackers to access files outside the intended download location through a web endpoint's path parameter. The issue becomes risky when attacker- controlled path values are processed without canonicalization and the endpoint is reachable without authentication.

An unauthenticated path traversal vulnerability in JeeWMS allows remote attackers to access files outside the intended download location through a web endpoint's path parameter. The issue becomes risky when attacker- controlled path values are processed without canonicalization and the endpoint is reachable without authentication.

Affected context

The vulnerability occurs in JeeWMS deployments that expose the affected file viewing or download functionality and process user-controlled path values. It is particularly significant when the endpoint is reachable from an untrusted network and authentication or authorization checks do not protect the request path.

The vulnerability occurs in JeeWMS deployments that expose the affected file viewing or download functionality and process user-controlled path values. It is particularly significant when the endpoint is reachable from an untrusted network and authentication or authorization checks do not protect the request path.

Exploit preconditions

  • Attack surface: Network-accessible HTTP file viewing or download endpoint - Required access: Ability to send unauthenticated requests to the endpoint - Trigger point: Processing of an attacker-controlled file path parameter - Why exploitation is possible: Path input is accepted without sufficient

traversal prevention, allowing resolution outside the intended directory

  • Attack surface: Network-accessible HTTP file viewing or download endpoint - Required access: Ability to send unauthenticated requests to the endpoint - Trigger point: Processing of an attacker-controlled file path parameter - Why exploitation is possible: Path input is accepted without sufficient

traversal prevention, allowing resolution outside the intended directory

Why this happens

The underlying bug is improper restriction of external file paths. The application uses attacker-controlled path input to locate a file without reliably normalizing the path and enforcing that the result remains within an approved base directory. This behavior maps to CWE-22, Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

The underlying bug is improper restriction of external file paths. The application uses attacker-controlled path input to locate a file without reliably normalizing the path and enforcing that the result remains within an approved base directory. This behavior maps to CWE-22, Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • An unauthenticated attacker may read sensitive local files.
  • Exposed files could contain credentials, configuration data, or application secrets.
  • Disclosure of operating system or deployment information could support further attacks.
  • The vulnerability could contribute to broader system compromise if sensitive credentials are exposed.
  • An unauthenticated attacker may read sensitive local files.
  • Exposed files could contain credentials, configuration data, or application secrets.
  • Disclosure of operating system or deployment information could support further attacks.
  • The vulnerability could contribute to broader system compromise if sensitive credentials are exposed.

General mitigation guidance

Mitigation generally centers on removing trust from client-supplied file paths and enforcing a narrow, server-controlled file selection model. Secure patterns include mapping opaque identifiers to approved files, canonicalizing paths before authorization, verifying that resolved paths remain within an allowed directory, and rejecting traversal indicators and unexpected path formats. Authentication and authorization should be enforced consistently at the endpoint and surrounding request-processing layers. File-serving processes should use least-privilege accounts, minimize accessible data, and avoid exposing sensitive directories by default.

Mitigation generally centers on removing trust from client-supplied file paths and enforcing a narrow, server-controlled file selection model. Secure patterns include mapping opaque identifiers to approved files, canonicalizing paths before authorization, verifying that resolved paths remain within an allowed directory, and rejecting traversal indicators and unexpected path formats. Authentication and authorization should be enforced consistently at the endpoint and surrounding request-processing layers. File-serving processes should use least-privilege accounts, minimize accessible data, and avoid exposing sensitive directories by default.

How teams detect issues like this

Detection can include static analysis for filesystem APIs that concatenate request parameters into paths, along with code review of path normalization and authorization order. Dynamic testing and web application monitoring can look for rejected or unusual path parameters, repeated encoded separator patterns, and requests targeting files outside approved locations. Policy enforcement can require allowlisted file identifiers, centralized path validation, and security tests for every file-serving endpoint. Automated review tools may help identify common traversal-prone data flows.

Detection can include static analysis for filesystem APIs that concatenate request parameters into paths, along with code review of path normalization and authorization order. Dynamic testing and web application monitoring can look for rejected or unusual path parameters, repeated encoded separator patterns, and requests targeting files outside approved locations. Policy enforcement can require allowlisted file identifiers, centralized path validation, and security tests for every file-serving endpoint. Automated review tools may help identify common traversal-prone data flows.

Frequently asked

questions

Yes. If the affected endpoint is network-accessible and remains unauthenticated, a remote attacker may attempt to access files through crafted path input.

The described issue does not require authentication. Network reachability to the vulnerable endpoint is the key access requirement.

Avoid accepting arbitrary filesystem paths from clients. Use server-side allowlists or opaque file identifiers, canonicalize resolved paths, and verify they remain within an approved directory.

Apply centralized path validation, enforce authorization before file access, run the service with minimal filesystem permissions, and include traversal-focused tests and code-review checks in development workflows.

Yes. If the affected endpoint is network-accessible and remains unauthenticated, a remote attacker may attempt to access files through crafted path input.

The described issue does not require authentication. Network reachability to the vulnerable endpoint is the key access requirement.

Avoid accepting arbitrary filesystem paths from clients. Use server-side allowlists or opaque file identifiers, canonicalize resolved paths, and verify they remain within an approved directory.

Apply centralized path validation, enforce authorization before file access, run the service with minimal filesystem permissions, and include traversal-focused tests and code-review checks in development workflows.

Find out what's already
exploitable in your codebase.