CVE-2021-34356

7.6 HIGH

📋 TL;DR

This cross-site scripting (XSS) vulnerability in QNAP Photo Station allows remote attackers to inject malicious JavaScript code into web pages viewed by other users. It affects QNAP NAS devices running vulnerable versions of Photo Station. Successful exploitation could lead to session hijacking, credential theft, or malware delivery.

💻 Affected Systems

Products:
  • QNAP Photo Station
Versions: Versions prior to Photo Station 6.0.18
Operating Systems: QTS (QNAP Turbo NAS Operating System)
Default Config Vulnerable: ⚠️ Yes
Notes: Affects QNAP NAS devices with Photo Station enabled. The vulnerability is in the web interface component.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of QNAP device admin session leading to full device takeover, data exfiltration, ransomware deployment, or lateral movement within the network.

🟠

Likely Case

Session hijacking of Photo Station users, credential theft, defacement of photo galleries, or delivery of malware to authenticated users.

🟢

If Mitigated

Limited impact with proper input validation and output encoding in place, potentially only affecting non-sensitive user sessions.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

XSS vulnerabilities typically have low exploitation complexity once the injection vector is identified. Requires user interaction (visiting a malicious link or page).

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Photo Station 6.0.18 (released 2021/09/01) and later

Vendor Advisory: https://www.qnap.com/en/security-advisory/qsa-21-41

Restart Required: Yes

Instructions:

1. Log into QNAP NAS web interface as admin. 2. Go to App Center. 3. Check for Photo Station updates. 4. Install Photo Station 6.0.18 or later. 5. Restart Photo Station service or the entire NAS.

🔧 Temporary Workarounds

Disable Photo Station

all

Temporarily disable Photo Station application if patching is not immediately possible

From QNAP web interface: Control Panel > Applications > Photo Station > Disable

Restrict Network Access

all

Limit Photo Station access to trusted internal networks only using firewall rules

From QNAP web interface: Control Panel > Security > Firewall > Add rule to block external access to Photo Station ports

🧯 If You Can't Patch

  • Implement web application firewall (WAF) with XSS protection rules
  • Disable JavaScript execution in Photo Station interface via browser policies

🔍 How to Verify

Check if Vulnerable:

Check Photo Station version in QNAP App Center. If version is below 6.0.18, the system is vulnerable.

Check Version:

From QNAP SSH: /etc/init.d/photo_station.sh version

Verify Fix Applied:

Confirm Photo Station version is 6.0.18 or higher in App Center. Test XSS payloads are properly sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual JavaScript payloads in web server logs
  • Multiple failed XSS attempts in Photo Station access logs

Network Indicators:

  • Suspicious JavaScript in HTTP requests to Photo Station endpoints
  • Unexpected redirects from Photo Station URLs

SIEM Query:

source="qnap_logs" AND "Photo Station" AND ("script" OR "javascript" OR "onerror" OR "onload")

🔗 References

📤 Share & Export