CVE-2021-40358

9.9 CRITICAL

📋 TL;DR

This is a critical path traversal vulnerability (CWE-22) in Siemens SIMATIC PCS 7 and WinCC systems that allows attackers to bypass directory restrictions and perform unauthorized file operations. Attackers can read, write, or delete critical files on the web server, potentially leading to system compromise. Affected systems include multiple versions of SIMATIC PCS 7 (V8.2, V9.0, V9.1) and WinCC (V7.4, V7.5, V15, V16, V17).

💻 Affected Systems

Products:
  • SIMATIC PCS 7
  • SIMATIC WinCC
Versions: PCS 7 V8.2 (all versions), V9.0 (< V9.0 SP3 UC04), V9.1 (< V9.1 SP1); WinCC V15 (< V15 SP1 Update 7), V16 (< V16 Update 5), V17 (< V17 Update 2), V7.4 (< V7.4 SP1 Update 19), V7.5 (< V7.5 SP2 Update 5)
Operating Systems: Windows
Default Config Vulnerable: ⚠️ Yes
Notes: All affected versions in default configurations are vulnerable. The vulnerability exists in the web server component.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through arbitrary file write leading to remote code execution, configuration modification, or data destruction.

🟠

Likely Case

Unauthorized file access leading to sensitive information disclosure, configuration tampering, or denial of service through file deletion.

🟢

If Mitigated

Limited impact if proper network segmentation and access controls prevent exploitation attempts.

🌐 Internet-Facing: HIGH - Web servers exposed to internet are directly vulnerable to unauthenticated attacks.
🏢 Internal Only: HIGH - Internal attackers or compromised internal systems can exploit this vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability allows unauthenticated exploitation via web requests. No public exploit code is known, but the vulnerability is straightforward to exploit.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: PCS 7 V9.0 SP3 UC04, V9.1 SP1; WinCC V15 SP1 Update 7, V16 Update 5, V17 Update 2, V7.4 SP1 Update 19, V7.5 SP2 Update 5

Vendor Advisory: https://cert-portal.siemens.com/productcert/pdf/ssa-840188.pdf

Restart Required: Yes

Instructions:

1. Download appropriate updates from Siemens support portal. 2. Apply updates according to Siemens documentation. 3. Restart affected systems. 4. Verify patch installation.

🔧 Temporary Workarounds

Network Segmentation

all

Restrict network access to affected web servers to only trusted sources.

Web Application Firewall

all

Deploy WAF with rules to detect and block path traversal attempts.

🧯 If You Can't Patch

  • Isolate affected systems in separate network segments with strict firewall rules
  • Implement strict access controls and monitor for suspicious file operations

🔍 How to Verify

Check if Vulnerable:

Check installed version against affected versions list. Review Siemens advisory for specific version checks.

Check Version:

Check version through Siemens management console or product documentation

Verify Fix Applied:

Verify installed version matches or exceeds patched versions listed in vendor advisory.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns
  • Path traversal strings in web logs (../, ..\, %2e%2e%2f)
  • Unauthorized file modification attempts

Network Indicators:

  • HTTP requests containing path traversal sequences to affected endpoints
  • Unusual file operations via web interface

SIEM Query:

web.url:*../* AND (dst.port:80 OR dst.port:443) AND dst.ip:[affected_systems]

🔗 References

📤 Share & Export