CVE-2021-3394

8.8 HIGH

📋 TL;DR

CVE-2021-3394 is a local privilege escalation vulnerability in Millennium Millewin (Cartella clinica) software due to insecure folder permissions. An authenticated local attacker can exploit this to gain SYSTEM-level privileges on Windows systems. This affects healthcare organizations using vulnerable versions of the medical records software.

💻 Affected Systems

Products:
  • Millennium Millewin
  • Cartella clinica
Versions: 13.39.028, 13.39.28.3342, 13.39.146.1
Operating Systems: Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability involves unquoted service paths and insecure permissions on installation folders.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with SYSTEM privileges, allowing installation of malware, data theft, or ransomware deployment across the healthcare network.

🟠

Likely Case

Local privilege escalation leading to unauthorized access to sensitive patient medical records and administrative functions within the healthcare system.

🟢

If Mitigated

Limited to standard user privileges with proper access controls, preventing escalation to SYSTEM-level access.

🌐 Internet-Facing: LOW - This is a local privilege escalation requiring authenticated access to the system.
🏢 Internal Only: HIGH - Healthcare staff with standard user accounts could escalate privileges to access sensitive patient data and system functions.

🎯 Exploit Status

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

Exploit requires local authenticated access. Public exploit code available on Exploit-DB and Packet Storm.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Contact vendor for patched version

Vendor Advisory: No public vendor advisory found

Restart Required: Yes

Instructions:

1. Contact Millennium/Millewin vendor for security patches
2. Apply patches to all affected systems
3. Restart systems after patch application
4. Verify folder permissions are properly secured

🔧 Temporary Workarounds

Secure Folder Permissions

windows

Manually adjust folder permissions to restrict write access to installation directories

icacls "C:\Program Files\Millewin" /inheritance:r /grant:r "SYSTEM:(OI)(CI)F" "Administrators:(OI)(CI)F" "Users:(OI)(CI)RX"

Quote Service Paths

windows

Ensure all service paths are properly quoted in Windows registry

sc config "MillewinService" binPath= "\"C:\Program Files\Millewin\service.exe\""

🧯 If You Can't Patch

  • Implement strict access controls and least privilege principles for all user accounts
  • Monitor for suspicious file creation in Millewin installation directories and service-related activities

🔍 How to Verify

Check if Vulnerable:

Check if Millewin service paths are unquoted: sc qc "MillewinService" | findstr BINARY_PATH_NAME. Check folder permissions: icacls "C:\Program Files\Millewin"

Check Version:

Check software version in About dialog or installation directory properties

Verify Fix Applied:

Verify service paths are quoted and folder permissions restrict write access to authorized users only

📡 Detection & Monitoring

Log Indicators:

  • Windows Event ID 4688 (Process Creation) showing execution from Millewin directories with SYSTEM privileges
  • Unexpected file creation in Millewin installation folders

Network Indicators:

  • No specific network indicators as this is local privilege escalation

SIEM Query:

source="windows" AND (event_id=4688 AND process_path="*Millewin*" AND user="SYSTEM") OR (event_id=4663 AND object_name="*Millewin*" AND access_mask="0x2")

🔗 References

📤 Share & Export