CVE-2026-0965: Libssh: libssh: denial of service via improper configuration file handling

Published Feb 4, 2026
·
Updated

A flaw was found in libssh where it can attempt to open arbitrary files during configuration parsing. A local attacker can exploit this by providing a malicious configuration file or when the system is misconfigured. This vulnerability could lead to a Denial of Service (DoS) by causing the system to try and access dangerous files, such as block devices or large system files, which can disrupt normal operations.

Other sources

libssh can try to open any file during configuration parsing, when misconfigured or when local attacker can provide malicious configuration. This applies for all configuration loaded from default location, configuration provided through the sshconfigparsefile() and sshbindconfigparsefile() functions as well as configuration files included from them directly or through glob wildcards.

The possibly dangerous files involve block devices, fifo, named pipe or huge system files that could cause Denial of Service.

The solution here is allowing to read only regular files and enforcing configuration file size limit of 16MB. Currently, maximum line length of a configuration file is 1K so this will effectively mean configuration files of 16K lines should still keep working.

Red Hat

Libssh: libssh: denial of service via improper configuration file handling

Microsoft

Affected Software

7 affected componentsFixes available
libssh libssh
Microsoft azl3 libssh 0.10.6-5
Microsoft azl3 libssh 0.10.6-6
libssh libssh<=0.11.3
redhat Enterprise Linux=9.0
redhat Enterprise Linux=10.0
Microsoft cbl2 libssh 0.10.6-5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Modify libssh configuration parsing so that configuration is read only from regular files; prevent opening dangerous file types (e.g., block devices and fifo/named pipe) during configuration parsing for all configuration loaded from the default location and for files referenced via direct include/glob wildcards.

    libssh ssh_bind_config_parse_file() / ssh_config_parse_file() configuration file handling = Allow reading only regular files (deny block devices, FIFOs/named pipes, and other non-regular files)
  2. Configuration

    Enforce a maximum configuration file size limit of 16MB for configuration parsing in ssh_bind_config_parse_file() / ssh_config_parse_file() to reduce DoS risk from huge system files.

    libssh configuration file size limit = 16MB
  3. Configuration

    Ensure that configurations provided via ssh_config_parse_file() that are 16K lines or fewer continue to work while preventing DoS from excessively large inputs.

    libssh maximum number of configuration lines from ssh_config_parse_file() = 16K lines

Event History

Feb 4, 2026
Data Sourced
via Red Hat·11:43 PM
DescriptionSeverityAffected Software
Mar 26, 2026
CVE Published
via MITRE·08:06 PM
Data Sourced
via MITRE·08:06 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeaknessAffected Software
Mar 31, 2026
Data Sourced
via Microsoft·08:01 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:01 AM
Affected Software
Updated
via Microsoft·08:01 AM
DescriptionSeverity
Updated
via Microsoft·08:01 AM
SeverityAffected 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.

Frequently Asked Questions

1

What is the severity of CVE-2026-0965?

CVE-2026-0965 is classified as a denial of service vulnerability due to improper configuration file handling in libssh.

2

How do I fix CVE-2026-0965?

To mitigate CVE-2026-0965, ensure that your libssh configuration files are secure and do not include arbitrary file references.

3

Who is affected by CVE-2026-0965?

CVE-2026-0965 affects users of libssh who utilize improper configuration files.

4

What causes CVE-2026-0965?

CVE-2026-0965 is caused by libssh's improper handling of configuration files that can lead to attempts at opening arbitrary files.

5

Can CVE-2026-0965 be exploited remotely?

CVE-2026-0965 primarily requires local access for exploitation, so remote exploitation is unlikely without local privileges.

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