Unauthenticated arbitrary file read through path traversal in Metacat 2.x

The archive read action of Metacat's legacy 1.x API concatenates the archiveEntryName parameter into a filesystem path, and its read-permission check is commented out. A single unauthenticated GET request returns any file the Tomcat process can read, including database and LDAP credentials and the node's DataONE private keys.

CVE
CVE-2026-47754
Weakness
CWE-22
CWE-862
Vendor
NCEAS
Product
Metacat
Affected
2.19.1 and earlier, including all 1.x releases
Fixed in
3.0.0

Overview

Metacat is a metadata catalogue and data repository developed by the National Center for Ecological Analysis and Synthesis (NCEAS) at UC Santa Barbara. It is used by research programs, universities and members of the DataONE federation, including the Knowledge Network for Biocomplexity (KNB).

Metacat 2.x through 2.19.1, and all 1.x releases, expose an action=read request in the legacy Metacat API. When the request carries an archiveEntryName parameter, it is handled by ArchiveHandler.readArchiveEntry(), which appends that parameter to a filesystem path without validation and then streams the file back. The method's read-permission check is commented out. An unauthenticated attacker can therefore read any file the Tomcat process can read with a single GET request.

The legacy API, including ArchiveHandler.java, was removed in Metacat 3.0.0 as an architectural cleanup rather than a security fix, so no advisory was issued at the time and the 2.x branch was never patched. NCEAS published GHSA-m852-f287-7cgw for this issue on 27 May 2026.

Affected configurations

Any Metacat deployment below 3.0.0 that exposes the legacy MetaCatServlet (mapped by default at /metacat, /metacat/* and /servlet/metacat) is affected. No account, session or valid document identifier is required.

Deployments on 3.0.0 or later are not affected, because the handler no longer exists.

Details

MetaCatServlet sends any action=read request that includes archiveEntryName to ArchiveHandler, bypassing the permission checks in the normal read path:

} else if (action.equals("read")) {
    if (params.get("archiveEntryName") != null) {
        ArchiveHandler.getInstance().readArchiveEntry(params, request,
                response, userName, password, groupNames);
    } else {
        handler.handleReadAction(params, request, response, userName, password,
                groupNames);
    }

Inside readArchiveEntry(), the only authorization check has been commented out:

//            //check the permission for read
//            try {
//            	if (!DocumentImpl.hasReadPermission(user, groups, docid)) {
//            		...
//            		return;
//            	}

Both docid and archiveEntryName are then concatenated into filesystem paths without any normalization or containment check:

String expandedArchiveBasePath = PropertyService.getProperty("application.expandedArchivePath");
String expandedArchivePath = expandedArchiveBasePath + FileUtil.getFS() + docid;
String entryFilePath = expandedArchivePath + FileUtil.getFS() + archiveEntryName;

// If the expanded archive directory does not exist, create it.
if (!FileUtil.isDirectory(expandedArchivePath)) {
	FileUtil.createDirectory(expandedArchivePath);
}

Excerpts from src/edu/ucsb/nceas/metacat/MetaCatServlet.java and ArchiveHandler.java, Metacat 2.19.0, © Regents of the University of California and NCEAS, GPLv2.

entryFilePath is eventually opened with new FileInputStream(filePath) in ResponseUtil and written to the response. Because archiveEntryName can contain ../ sequences, the path resolves outside the archive directory to any file on the host.

As a side effect, every request also creates a directory named after the attacker-supplied docid, which is the source of the limited integrity impact in the CVSS vector.

Impact

Anything the Tomcat user can read is exposed, including:

  • metacat.properties, which holds the PostgreSQL credentials, LDAP bind credentials, DOI/EZID service credentials and DataONE cluster passwords. The database credentials give direct read and write access to every stored record.
  • The local password file (by default /var/metacat/users/password.xml), with every local user's DN and BCrypt hash for offline cracking.
  • The node's DataONE client certificate and private key, which let an attacker impersonate the member node to the rest of the DataONE federation.
  • Stored research data under the Metacat data and documents directories, including embargoed or access-controlled datasets, bypassing every access control list.
  • System files such as /etc/passwd and /proc/self/environ, which can hold secrets injected into containerized deployments.

Proof of concept

A single request with no session reads a file from outside the archive directory. The docid value does not need to exist:

GET /catalog/metacat?action=read&docid=x&archiveEntryName=../../../../etc/passwd HTTP/1.1
Host: <target>

The response body contains the contents of /etc/passwd.

Remediation

Upgrade to Metacat 3.0.0 or later, preferably the current 3.x release. The 2.x branch will not receive a fix.

If an upgrade is not immediately possible, NCEAS recommends disabling the legacy API by removing the servlet-mapping entries for edu.ucsb.nceas.metacat.MetaCatServlet from Tomcat's web.xml and restarting Tomcat. The equivalent functionality is available in the DataONE REST API. See GHSA-m852-f287-7cgw for the full configuration.

Disclosure timeline

  1. Discovered with William Wallace (fjord.ai) during an authorized security assessment
  2. Reported privately to the Metacat maintainers by email, proposing 30 days before public disclosure
  3. Maintainers confirmed the issue
  4. Offered to review the draft advisories
  5. Maintainers drafted the advisory, invited us to collaborate on it, and proposed a security policy for the repository
  6. GitHub, acting as CNA, reserved CVE-2026-47754. The security policy was merged the same day
  7. Maintainers published GitHub advisory GHSA-m852-f287-7cgw
  8. CVE record and NVD entry published. CISA assessment: exploitation none, automatable yes, technical impact partial
  9. Advisory published

References

Revision history

  1. Initial publication

Machine-readable: LVL0X00-2026-0002.json