# JLSEC-2025-332: A flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library

- Severity: High 8.1 (CVSS:3.1, scored by Julia Security Advisories) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-12-01T22:53:23.543Z
- Modified: 2026-07-25T18:23:41.882Z
- Related: CVE-2025-5987

## Description

A flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library. If an attacker manages to exhaust the heap space, this error is not detected and may lead to libssh using a partially initialized cipher context. This occurs because the OpenSSL error code returned aliases with the `SSH_OK` code, resulting in libssh not properly detecting the error returned by the OpenSSL library. This issue can lead to undefined behavior, including compromised data confidentiality and integrity or crashes.

(As written by Julia Security Advisories.)

## Affected

- libssh_jll (Julia): before 0.11.3+0

## References

- <https://access.redhat.com/errata/RHSA-2025:23483> (web)
- <https://access.redhat.com/errata/RHSA-2025:23484> (web)
- <https://access.redhat.com/errata/RHSA-2026:0427> (web)
- <https://access.redhat.com/errata/RHSA-2026:0428> (web)
- <https://access.redhat.com/errata/RHSA-2026:0430> (web)
- <https://access.redhat.com/errata/RHSA-2026:0431> (web)
- <https://access.redhat.com/errata/RHSA-2026:0702> (web)
- <https://access.redhat.com/errata/RHSA-2026:0978> (web)
- <https://access.redhat.com/errata/RHSA-2026:0980> (web)
- <https://access.redhat.com/errata/RHSA-2026:0985> (web)
- <https://access.redhat.com/errata/RHSA-2026:0996> (web)
- <https://access.redhat.com/errata/RHSA-2026:1539> (web)
- <https://access.redhat.com/errata/RHSA-2026:1541> (web)
- <https://access.redhat.com/errata/RHSA-2026:3415> (web)
- <https://access.redhat.com/security/cve/CVE-2025-5987> (web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2376219> (web)
- <https://www.libssh.org/security/advisories/CVE-2025-5987.txt> (web)

## Sources

- Julia Security Advisories: [JLSEC-2025-332](https://osv.dev/vulnerability/JLSEC-2025-332), CC-BY-4.0, modified 2026-07-25

---

Page: https://cve.day/JLSEC-2025-332 · Whole record: https://cve.day/JLSEC-2025-332.json · Rebuilt by cve.day 2026-11-25T22:56:25.808Z
