CVE-2026-144914 — Youzan ZanProxy — CWE-22
A vulnerability has been found in Youzan ZanProxy 5.0.0/5.1.0. Impacted is the function getDataFilePath of the file src/core/services/mock.ts of the component Mock Data Service. The manipulation of the argument ID leads to path traversal. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not responded yet.
A vulnerability has been found in Youzan ZanProxy 5.0.0/5.1.0. Impacted is the function getDataFilePath of the file src/core/services/mock.ts of the component Mock Data Service. The manipulation of the argument ID leads to path traversal. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not responded yet.
🎯 What is this vulnerability?
Technical flaw
The getDataFilePath function in src/core/services/mock.ts of Youzan ZanProxy (v5.0.0 / 5.1.0) concatenates the user‑supplied ID argument directly into a file‑system path without any sanitisation, canonicalisation, or base‑directory enforcement.
Because the function is exposed via a public HTTP endpoint, an unauthenticated attacker can supply a crafted ID that contains directory‑traversal sequences (../, URL‑encoded %2e%2e%2f, etc.). The server then resolves the path relative to the working directory and reads the file, returning its contents (or a reference to it) to the client.
CWE‑22 – Path Traversal
The missing check is a path‑normalisation guard. The code should either:
1. Reject any ID containing . or / characters, or
2. Resolve the path with a safe base directory and reject any result that escapes that base.
Because the function is called by a remote API, the vulnerability is exploitable without authentication or UI interaction.
⚡ Attack Chain
NOTE: The exact URI and parameter names are not disclosed in the CVE text. The example below uses a plausible REST endpoint (/api/mock/data) and a query parameter (id). It is an illustrative payload that demonstrates the class of attack.
1. Discovery & Reconnaissance
| Step | Technique | Tool / Command |
|---|---|---|
| Identify target | Scan for known ZanProxy services | nmap -p 80,443 --script http-enum <target> |
| Verify version | Probe /version or User‑Agent header | curl -sI http://<target>/api/version |
| Locate vulnerable endpoint | Enumerate /api/mock/* endpoints | dirsearch -u http://<target>/api/mock/ -e php,js,ts |
If the service responds with a JSON payload containing an id field or a documented API reference, the attacker can proceed.
2. Exploitation
PoC (illustrative)
# Target: http://example.com
# Vulnerable endpoint (illustrative): /api/mock/data
# Parameter: id
curl -s "http://example.com/api/mock/data?id=../../../../etc/passwd" \
-H "Accept: application/json" \
-o /dev/null -w "%{http_code}\n"What happens?
- The server concatenates the supplied
idinto a path like./data/../../../../etc/passwd. - The OS resolves this to
/etc/passwd(or another file, depending on the working directory). - The service reads the file and returns its contents (or a reference) to the client.
- URL‑encoded:
id=%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd - Double‑encoding:
id=%252e%252e%252fetc%252fpasswd - Youzan ZanProxy 5.0.0
- Youzan ZanProxy 5.1.0
Alternative payloads
If the API returns the file content directly, the attacker can capture it with curl -s. If the API only returns a file path, the attacker can then request that path (if the service exposes it) or use the path in a subsequent request.
3. Post‑exploitation
| Goal | How it can be achieved |
|---|---|
| Data exfiltration | Read sensitive configuration files (config.yaml, secrets.json), environment variables, or credential stores (.env, application.properties). |
| Privilege escalation | If the service runs as a privileged user (e.g., root), reading /etc/shadow or /etc/passwd can provide hashed passwords. |
| RCE via file inclusion | If the application later includes the read file (e.g., via a templating engine), the attacker could inject malicious code. |
| Persistence | If the service allows writing files (not mentioned in the CVE), the attacker could upload a webshell or modify configuration files to maintain access. |
Because the CVSS vector indicates low confidentiality, integrity, and availability impact, the immediate damage is limited to data exposure. However, the data exposed can be leveraged for further attacks (credential stuffing, lateral movement, etc.).
🌍 Real World Impact
| Impact | CVSS Value | Practical consequence |
|---|---|---|
| Confidentiality (C:L) | 0.3 | Arbitrary files can be read, exposing secrets, credentials, or sensitive logs. |
| Integrity (I:L) | 0.3 | If the application later processes the file, tampering could lead to data corruption or code injection. |
| Availability (A:L) | 0.3 | Repeated traversal attempts could cause I/O load or crash the service if the file system is exhausted. |
Overall CVSS score: 7.3 (High)
The vulnerability is remote (AV:N), low attack complexity (AC:L), no privilege or UI required (PR:N, UI:N), and unchanged scope (S:U). The high score reflects the ease of exploitation and the potential for data exfiltration.
🛡️ Remediation & Mitigation
Affected Versions
Upgrade to any release that patches src/core/services/mock.ts (the vendor has not yet released a fix; monitor the official repository or issue tracker for a patch).Workarounds
1. Input Validation
- Reject any ID containing . or / characters.
- Accept only a whitelist of allowed characters (e.g., alphanumerics, underscore).
if (!/^[a-zA-Z0-9_]+$/.test(id)) {
throw new Error('Invalid ID');
}2. Path Normalisation
- Resolve the path relative to a fixed base directory and verify that the resolved path starts with that base.
const base = path.resolve(__dirname, 'data');
const target = path.resolve(base, id);
if (!target.startsWith(base)) {
throw new Error('Path traversal detected');
}3. WAF / ModSecurity Rule
SecRule ARGS:id "@rx \.\./" \
"phase:2,deny,status:403,msg:'Path traversal attempt',id:1001"4. Access Restrictions
- If the endpoint is not required publicly, restrict it to internal networks or authenticated users.
- Use network ACLs or VPN to limit exposure.
5. Disable the Mock Data Service
- If the service is not needed in production, comment out or remove the route entirely.
Detection
| Log Pattern | Description |
|---|---|
Query string contains ../ or %2e%2e%2f | Likely traversal attempt |
Repeated 200/404 responses for the same id value | Automated probing |
Access to /api/mock/data from external IPs | Unusual traffic |
Sample WAF log entry
[2026-12-05 12:34:56] [modsecurity] [client 203.0.113.45] [id "1001"] [msg "Path traversal attempt"] [uri "/api/mock/data"] [args "id=../../../../etc/passwd"]⚠️ Urgency
nmap or a web‑application firewall).By addressing the path‑traversal flaw promptly, you eliminate the risk of arbitrary file disclosure and the downstream attacks that could arise from the stolen data.
[🤖 CVE Professor AI Security Engine]