[CVE Request] CWE-22: Unauthenticated Arbitrary File Write via AAS Thumbnail in Eclipse BaSyx V2 MongoDB Deployments
# CVE Reservation Request
The Eclipse Foundation is a [Common Vulnerabilities and Exposures](https://cve.mitre.org/) (CVE) Numbering Authority.
Creating this ticket initiates **reservation** of a CVE ID for the documented vulnerability. The reserved CVE ID will be posted in a comment below, and kept **confidential** until explicit publication request.
> [!note]
> To request CVE *publication*, please open a [CVE publication](https://gitlab.eclipse.org/security/cve-assignment/-/issues/new?issuable_template=CVE%20Publication%20Request) ticket.
Please fill in the fields below to draft the CVE record.
---
## CVE record information
**Project name:** Eclipse BaSyx Java Server SDK
**Project id:** dt.basyx
**Versions affected:** [2.0.0-milestone-05, 2.0.0-milestone-13) when configured with `basyx.backend=MongoDB`
**Common Weakness Enumeration (CWE):**
- [CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')](https://cwe.mitre.org/data/definitions/22.html)
- [CWE-73: External Control of File Name or Path](https://cwe.mitre.org/data/definitions/73.html)
**Common Attack Pattern Enumerations and Classifications (CAPEC):**
- [CAPEC-126: Path Traversal](https://capec.mitre.org/data/definitions/126.html)
**Common Vulnerability Scoring System:** CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
**Summary:**
In Eclipse BaSyx Java Server SDK versions 2.0.0-milestone-05 to 2.0.0-milestone-12, deployments using the MongoDB backend are vulnerable to an unauthenticated arbitrary file write through the AAS thumbnail API.
The AAS thumbnail upload path accepted a client-controlled `fileName` request parameter and passed it through repository file handling as both a repository key and, during thumbnail retrieval, a local filesystem path. With the MongoDB file repository, the supplied filename was treated as an opaque GridFS key and was not normalized or restricted as a filesystem path. A remote attacker could upload thumbnail content using an absolute or traversal-style filename, then trigger thumbnail retrieval so that the uploaded bytes were written to the attacker-chosen path on the server filesystem.
This could allow writing files anywhere the Java process has permission to write and may lead to remote code execution. The default InMemory backend is not affected by this specific path because it normalizes and restricts file paths to its temporary directory.
The issue is fixed in Eclipse BaSyx Java Server SDK 2.0.0-milestone-13.
**Links:**
- Confidential vulnerability report: https://gitlab.eclipse.org/security/vulnerability-reports/-/work_items/565
- Fix pull request: https://github.com/eclipse-basyx/basyx-java-server-sdk/pull/1024
- Fixed release: https://github.com/eclipse-basyx/basyx-java-server-sdk/releases/tag/2.0.0-milestone-13
**Credits:** Miruna Sandor
issue