/

CVE-2026-47754

Severity:

CRITICAL RISK

(9.3)

Unauthenticated Path Traversal (CWE-22) in Metacat API

CVE-2026-47754

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-862

Impact:

Unauthorized Arbitrary File Read and Sensitive Information Disclosure

Severity:

CRITICAL RISK

(9.3)

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

Metacat contains an unauthenticated path traversal vulnerability in the legacy 1.x API that allows a remote requester to read files accessible to the Tomcat process. The issue becomes critical when the legacy read endpoint is reachable without authentication, potentially exposing credentials, private keys, configuration data, and embargoed research data.

Affected context

The vulnerability occurs in Metacat 1.x API deployments in the 1.x through 2.19.1 release lines when the legacy action=read endpoint is exposed. The archiveEntryName parameter is incorporated into a filesystem path without adequate validation, while the surrounding read-permission check is not active. Deployments where these servlets remain reachable by unauthenticated network clients are particularly exposed.

Exploit preconditions

  • Attack surface: The legacy Metacat 1.x API and its action=read endpoint
  • Required access: Network access to the endpoint; authentication is not required
  • Trigger point: Processing of the archiveEntryName parameter by ArchiveHandler.readArchiveEntry()
  • Why exploitation is possible: User-controlled path data is concatenated into a filesystem path without traversal validation, and the intended authorization check is unavailable
  • Required runtime condition: The target file must be readable by the Tomcat or hosting process

Why this happens

The underlying defect is an unchecked path construction operation that treats attacker-controlled archive entry data as a trusted filesystem location. Without canonicalization, containment checks, or an effective authorization decision, traversal sequences can escape the intended archive directory and reference other readable files. This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with CWE-862: Missing Authorization contributing because access control is not enforced before the file operation.

Potential impact

  • Attackers may read application configuration files and stored credentials
  • Client certificates and private keys could be exposed
  • Federation member-node impersonation may become possible if sensitive keys are obtained
  • Embargoed research data may be disclosed
  • System details could be gathered to support additional attacks
  • The Tomcat process and connected repository environment could face broader compromise

General mitigation guidance

Mitigation generally focuses on removing or isolating legacy file-reading endpoints and enforcing authorization before any filesystem access.

Common defensive patterns include:

  • Restricting or disabling legacy API servlets that are not operationally required
  • Enforcing authentication and authorization at the application and reverse-proxy layers
  • Resolving requested paths canonically and verifying that they remain within an intended base directory
  • Allowing only validated archive entry identifiers rather than arbitrary path strings
  • Running Tomcat with a dedicated least-privilege account and minimal filesystem permissions
  • Preventing private keys, credentials, and unrelated repository files from being readable by the service
  • Restarting the servlet container after endpoint or configuration changes so stale servlet mappings are not retained

How teams detect issues like this

Detection can combine endpoint exposure review, application testing, and filesystem access monitoring.

Useful approaches include:

  • Inventorying externally reachable legacy 1.x API servlets and identifying unauthenticated read routes
  • Reviewing code for string concatenation or path resolution involving request parameters
  • Applying static analysis rules for missing canonicalization, base-directory containment checks, and authorization-before-file-access
  • Monitoring web logs for unusual requests to legacy read endpoints and repeated path-like parameter values
  • Auditing Tomcat file access for reads outside approved repository directories
  • Enforcing deployment policies that prohibit public exposure of deprecated or unnecessary API surfaces
  • Using automated security review tools to flag path traversal and missing-authorization patterns during code review

Sources

SourceLink
github.comgithub.com/NCEAS/metacat/commit/07e034b2bbf7029e28af32f472f4d70ea6b5ab1b
github.comgithub.com/NCEAS/metacat/issues/1365
github.comgithub.com/NCEAS/metacat/pull/1713
github.comgithub.com/NCEAS/metacat/security/advisories/GHSA-m852-f287-7cgw

Frequently asked

questions

Yes, when the legacy Metacat 1.x API is reachable over the network. The described attack does not require authentication, although network controls may limit who can reach the endpoint.

An attacker needs network access to the vulnerable action=read endpoint. The targeted file must also be readable by the Tomcat process.

Remove or restrict unnecessary legacy API endpoints, require authorization for file-backed operations, and enforce canonical path containment before accessing the filesystem.

Treat request parameters as untrusted, use identifier-based access instead of arbitrary paths, apply least-privilege filesystem permissions, and continuously test deprecated endpoints for unintended public exposure.

Find out what's already
exploitable in your codebase.