CVE-2026-104254

liboqs: Heap out-of-bounds read in LMS/HSS signature verification via unvalidated signature length (hss_verify_inc.c:215)

Published Nov 6, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
liboqs is a C-language cryptographic library that provides implementations of post-quantum cryptography algorithms. From 0.11.0 through 0.16.0, builds configured with OQS_ENABLE_SIG_STFL_LMS=ON can read beyond a caller-supplied signature buffer when an untrusted truncated LMS or HSS-LMS signature reaches OQS_SIG_STFL_verify or OQS_SIG_STFL_alg_lms_verify. In hss_validate_signature_init() in src/sig_stfl/lms/external/hss_verify_inc.c, consumed-length checks do not ensure that the bottom-level q and C fields remain available, allowing up to 32 bytes to be read past the buffer. In version 0.16.0, is_hss_public_key() also reads at offset 8 after only a four-byte length check, allowing an over-read of up to eight bytes. No valid signature is required, but the public key must be syntactically plausible. The read data is consumed only by an internal hash and is not exposed, so the supported impact is a possible verifier crash and denial of service, not memory disclosure or acceptance of an invalid signature. This issue is scheduled to be fixed in version 0.17.0.

Analysis

AI-generated

Technical impact

The vulnerability arises in liboqs when it verifies LMS or HSS signatures that are truncated or otherwise malformed. Internally, the function that initializes signature validation performs length checks that do not guarantee the requested fields of the signature remain within the supplied buffer, enabling an over‑read of up to 32 bytes in certain verification paths. A second over‑read of up to eight bytes occurs in the public‑key validation routine in version 0.16.0. Although the read data is not exported outside the library, the corrupted memory access can trigger a crash in the verifier, leading to a denial of service. No data is disclosed, and no attacker-controlled signature is accepted as valid.

Affected Systems

The affected component is the open‑quantum‑safe liboqs library, for releases from 0.11.0 through 0.16.0 (inclusive). These builds enable OQS_ENABLE_SIG_STFL_LMS and may be used in applications that rely on LMS or HSS‑LMS signature verification. Users of liboqs 0.16.0 are also vulnerable to a separate over‑read during public key sanity checks. Applications that embed liboqs should review the version they are using and the configuration flags that enable LMS/HSS support.

Risk and Exploitability

The CVSS score of 5.3 indicates a medium severity vulnerability. The EPSS score is not available, but because the flaw requires a crafted input to trigger the over‑read, the likelihood of exploitation depends on the exposure of the verification routine to untrusted data. The vulnerability is not currently listed in CISA's KEV catalog. An attacker who can interact with a service that performs LMS/HSS verification could send a malicious truncated signature to cause a crash and deny service. The vulnerability does not provide a path to information disclosure or to forging valid signatures.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade liboqs to version 0.17.0 or later, where the over‑read has been corrected.
  • If the library cannot be upgraded immediately, configure the build to disable LMS/HSS support or set OQS_ENABLE_SIG_STFL_LMS to OFF, preventing the vulnerable code paths.
  • Apply the commit df3eb80fe68d2e5db0ecf5d503082cd5699e0859 or merge the pull request 2507, which contain the upstream fix before the 0.17.0 release, when compatible with your build environment.
  • Ensure that any externally supplied signatures are validated for correct length before passing them to liboqs verification functions to avoid sending malformed input.

Generated by OpenCVE AI on November 6, 2026 at 22:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Open Quantum Safe
Open Quantum Safe liboqs
Vendors & Products Open Quantum Safe
Open Quantum Safe liboqs
Type Values Removed Values Added
Description liboqs is a C-language cryptographic library that provides implementations of post-quantum cryptography algorithms. From 0.11.0 through 0.16.0, builds configured with OQS_ENABLE_SIG_STFL_LMS=ON can read beyond a caller-supplied signature buffer when an untrusted truncated LMS or HSS-LMS signature reaches OQS_SIG_STFL_verify or OQS_SIG_STFL_alg_lms_verify. In hss_validate_signature_init() in src/sig_stfl/lms/external/hss_verify_inc.c, consumed-length checks do not ensure that the bottom-level q and C fields remain available, allowing up to 32 bytes to be read past the buffer. In version 0.16.0, is_hss_public_key() also reads at offset 8 after only a four-byte length check, allowing an over-read of up to eight bytes. No valid signature is required, but the public key must be syntactically plausible. The read data is consumed only by an internal hash and is not exposed, so the supported impact is a possible verifier crash and denial of service, not memory disclosure or acceptance of an invalid signature. This issue is scheduled to be fixed in version 0.17.0.
Title liboqs: Heap out-of-bounds read in LMS/HSS signature verification via unvalidated signature length (hss_verify_inc.c:215)
Weaknesses CWE-125
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 9, 2026, 10:42 PM
Reserved
Oct 1, 2026, 7:04 PM
Status
Awaiting Analysis
Published
Nov 6, 2026, 10:17 PM
Modified
Nov 12, 2026, 10:18 PM