CVE-2025-14821: Libssh: libssh: insecure default configuration leads to local man-in-the-middle attacks on windows

Published Dec 17, 2025
·
Updated

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.

Other sources

An insecure default configuration vulnerability exists in libssh on Windows systems where the library automatically loads configuration files from the C:\etc directory. Since this directory can be created and modified by unprivileged local users, an attacker can inject malicious SSH configuration or known-hosts entries. This enables local man-in-the-middle attacks, security downgrades of SSH connections, and manipulation of trusted host information. Exploitation requires only low privileges and no user interaction, posing a significant risk to the confidentiality, integrity, and availability of SSH communications that rely on libssh.

Red Hat

Affected Software

3 affected components
libssh libssh
libssh libssh<0.12.0
redhat Hardened Images

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    On Windows, configure libssh so it does NOT automatically load SSH configuration/known-hosts files from the C:\etc directory. Ensure the directory path used for libssh configuration is not writable or creatable/modifiable by unprivileged local users.

    libssh (Windows) Automatic loading of configuration files from C:\etc = Disable or prevent loading from C:\etc (accessible to unprivileged users)
  2. Compensating control

    Restrict permissions on the C:\etc directory used by libssh on Windows so unprivileged local users cannot create or modify SSH configuration or known-hosts entries (e.g., remove write/create permissions for low-privilege users).

Event History

Dec 17, 2025
Data Sourced
via Red Hat·11:52 AM
DescriptionSeverityAffected Software
Apr 7, 2026
CVE Published
via MITRE·04:34 PM
Data Sourced
via MITRE·04:34 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203