MediumCVE-2026-77382

    falcon-rust: Use of a Cryptographic Primitive with a Risky Implementation (CVE-2026-77382)

    Published Last modified Sources: EUVD, OSV, Hersteller, CVE.org

    Share

    What is affected, what to do

    Update falcon-rust to version 0.2.0.

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    5.9

    XIEM Effective CVSS

    Highest available CVSS rating from NVD and vendor data.

    Source: Vendor (CNA), CVSS v3

    5.9

    CVSS v3

    Severity Medium on the scale from 0 to 10.

    Source: EUVD, OSV, Hersteller, CVE.org

    —

    EPSS score

    No value is available for this vulnerability.

    Show all metrics
    Severity
    Medium
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    59.50 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    no public PoC known
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    5.9 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    5.9
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    —
    Published
    CISA assessment (SSVC)
    Exploitation: proof of concept · not automatable · Technical impact: partial
    Source: CISA Vulnrichment, as of 19 November 2026
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-1240

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Handle the vulnerability in regular vulnerability handling under Art. 21(2)(e) NIS2.
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    From 11.12.2027, Annex I Part II CRA requires manufacturers of affected products with digital elements to handle vulnerabilities without delay and provide security updates.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    Description

    Reporter: Connor Webber Package: falcon-rust (crates.io), repository github.com/aszepieniec/falcon-rust Affected: v0.1.3 and the current master (HEAD cfa1b35). Regression introduced in commit bf2cf00. Component: discrete-Gaussian sampler, src/samplerz.rs (approx_exp, ber_exp, sampler_z) Status: Confirmed by source review and by empirical measurement of the crate's own compiled code.

    Summary

    falcon-rust's discrete-Gaussian rejection sampler evaluates its exp() acceptance step at only 32 bits of fractional precision. Measured directly against the crate's own compiled code, approx_exp has a maximum relative error of 2^-33. For comparison, the Falcon reference implementation achieves about 2^-63, and the f64 code this crate replaced achieved about 2^-52. The current sampler is therefore roughly 2^19 (about 500,000x) less precise than the version it replaced, and about 2^30 less precise than the reference.

    Falcon's security proof relies on the sampled signatures being statistically indistinguishable from an ideal discrete Gaussian, so the signature transcript leaks nothing about the secret trapdoor. That guarantee holds only when the sampler's relative error stays small enough, over the roughly 2^64 signature budget, to keep the Renyi divergence between the real and ideal distributions negligible. The precision the security analysis relies on is cited in the literature between roughly 2^-40 and 2^-46 (for example the FACCT and isochronous-sampling analyses). At 2^-33 the sampler is below every value in that range, roughly 128x to 4096x too coarse depending on which bound you take, so the precondition the proof depends on is not met.

    There is a second, bound-independent piece of evidence that removes any ambiguity: the crate's sampler can no longer reproduce Falcon's known-answer test (KAT) vectors, which are the authoritative correctness oracle. Rather than restore the precision, the maintainers loosened their own test tolerance and noted that "rejection decisions may differ at the boundary." The regression is already visible in-tree; its security significance was simply not recognized.

    Because the sampler's sigma is derived from the secret basis Gram-Schmidt norms, the resulting distribution deviation is secret-dependent. The exp function itself is public, but its inputs, and therefore the deviation, depend on secret quantities. This is the class of flaw that statistical and hidden-number-problem learning attacks on biased Gaussian samplers target.

    The crate's own documentation describes this sampler as "side-channel-hardened" and notes that "the sampler defines the secret-key distribution, so getting it wrong weakens the cryptography," which is exactly the property this defect touches.

    Technical detail

    Root location: src/samplerz.rs

    • FixedPoint64 = FixedPoint<i64> with FRAC_UNIT = 1 << 32, i.e. 32 fractional bits (src/fixed_point.rs). The crate already defines FixedPoint128 with 64 fractional bits, the correct-precision type, but the sampler uses FixedPoint64.
    • approx_exp (samplerz.rs:34) evaluates the FACCT polynomial, whose coefficients are the correct 63-bit constants, but at line 59 it does let z: u64 = (x.0 as u64) << 31;. This takes the 32-bit-precision argument and zero-fills the low 31 bits into a 63-bit word, so the polynomial is evaluated at an argument quantized to 2^-32.
    • sampler_z computes dss = 0.5 * isigma^2 and ccs = sigma_min * isigma in this 32-bit type, where sigma is the per-leaf value derived from the secret basis Gram-Schmidt norms (ffSampling). The precision loss therefore lands on secret-dependent quantities.

    Regression: commit bf2cf00 ("Eliminate f64 from key generation via generic FixedPoint") replaced the prior f64 sampler. git show bf2cf00^:src/samplerz.rs shows the old fn approx_exp(x: f64, ccs: f64) operating at 63-bit scale. The change landed before the 0.1.3 release. The maintainers then re-pinned their tests to the degraded output and loosened the tolerance, and the Falcon KAT vectors no longer pass.

    Proof of concept (self-contained, reproducible)

    Append the following module to falcon-rust/src/samplerz.rs and run:

    cargo test -p falcon-rust --release dump_approx_exp_precision -- --nocapture

    It calls the crate's own approx_exp and measures its maximum relative error against true exp() over the sampler's input domain [0, ln 2].

    #[cfg(test)]
    mod prec_test {
        use super::*;
        #[test]
        fn dump_approx_exp_precision() {
            let n: u64 = 500000;
            let mut maxrel = 0.0f64;
            let two63 = 9223372036854775808.0f64; // 2^63
            for i in 0..=n {
                let x = (i as f64 / n as f64) * std::f64::consts::LN_2;
                let approx_u = approx_exp(FixedPoint64::from(x), FixedPoint64::ONE);
                let approx = approx_u as f64 / two63; // ~ exp(-x)
                let truev = (-x).exp();
                let rel = ((approx - truev) / truev).abs();
                if rel > maxrel { maxrel = rel; }
            }
            println!("MAXREL_APPROX_EXP={:.6e} log2={:.3}", maxrel, maxrel.log2());
            let req = 2f64.powi(-40);
            println!("FALCON_REQ_2^-40={:.3e}  RATIO_OVER_REQ={:.1}x", req, maxrel / req);
            let f64ref = 2f64.powi(-52);
            println!("F64_SAMPLER_2^-52={:.3e}  RATIO_OVER_F64={:.1}x", f64ref, maxrel / f64ref);
        }
    }
    

    Measured output (rustc 1.96.1, x86-64, release):

    MAXREL_APPROX_EXP=1.164152e-10 log2=-33.000
    FALCON_REQ_2^-40=9.095e-13  RATIO_OVER_REQ=128.0x
    F64_SAMPLER_2^-52=2.220e-16  RATIO_OVER_F64=524287.3x
    

    So the sampler is at 2^-33, about 128x coarser than even the loosest cited requirement (2^-40), and about 500,000x coarser than the f64 sampler this code replaced.

    Impact

    The sampler's output distribution deviates from the specified discrete Gaussian by more than the security analysis allows, so the Renyi-divergence argument that guarantees the signature transcript hides the secret trapdoor no longer applies. Because the same sampler is used at key-generation time, the secret key itself is also drawn from a distribution that differs from the specified one. The deviation is secret-dependent, which is the property that statistical and hidden-number-problem learning attacks on biased Gaussian samplers exploit.

    To be precise about scope (see Severity): this is a measured precision defect that voids the proof's precondition. It is not a demonstrated end-to-end key recovery.

    Severity (honest scoping)

    Medium. This is a measured failure to meet the scheme's mandated sampler precision, which for a cryptographic library is a defect in its own right, because the security proof's precondition is provably not met and the reference KAT vectors fail. It is not a demonstrated key-recovery attack. Being coarser than the required bound invalidates the proof, but does not by itself establish a practical break. Showing recovery would require a full statistical-learning simulation over many signatures, and whether that is feasible within a realistic signature budget at a per-sample bias of 2^-33 is an open question. That uncertainty is why this is scoped as an unsoundness and proof-conformance defect rather than a claimed exploit. Suggested RUSTSEC classification: informational = "unsound" (cryptographic-soundness defect), or a Medium advisory.

    Fix

    Perform sampler_z, ber_exp, and approx_exp at 53-bit precision (f64) or higher, or use the crate's existing FixedPoint128 (64 fractional bits) throughout the acceptance-probability computation. Restore the Falcon reference KAT vectors as the test oracle instead of the loosened tolerance.

    Disclosure

    Coordinated. Private notification to the maintainer first (this GitHub advisory), then RUSTSEC advisory-db. No public disclosure before maintainer contact.

    Note on tooling

    Claude Opus (Anthropic's coding assistant) was used to help test the hypothesis, specifically to build the crate and measure `

    Source: ENISA EUVD, OSV (Open Source Vulnerabilities), GitHub Security Advisories, cvelistv5, NVD (NIST), CVE.org (MITRE)

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    aszepieniecfalcon-rust
    • < 0.2.0
    • 0.2.0
    crates.iofalcon-rust
    • —
    • 0.2.0
    rustfalcon-rust
    • <= 0.1.3
    • 0.2.0

    Vendors and products

    Weakness classes (CWE)

    • CWE-1240Use of a Cryptographic Primitive with a Risky Implementation

      Base

      To fulfill the need for a cryptographic primitive, the product implements a cryptographic algorithm using a non-standard, unproven, or disallowed/non-compliant cryptographic implementation.

      Entry at MITRE CWE-1240

    References & sources

    • github.comaszepieniec/falcon-rust/commit/930d766256f9d67ec9b6d437557286cf…x_refsource_MISC, euvd, web
    • github.comaszepieniec/falcon-rust/commit/bf2cf000e63a9803f7ab1a34f629a5a0…x_refsource_MISC, euvd, web
    • github.comaszepieniec/falcon-rust/releases/tag/v0.2.0x_refsource_MISC, euvd, web
    • github.comaszepieniec/falcon-rust/security/advisories/GHSA-25rm-9wvm-m38vx_refsource_CONFIRM, euvd, web
    • NVD (NIST)vuln/detail/CVE-2026-77382advisory, euvd
    • github.comaszepieniec/falcon-rustpackage

    Changes to this CVE

    Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).

    1. Record modifiedCISA ADP

      CISA assessment (SSVC): exploitation: proof of concept, automatable: no

      Show 2 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Referenceadded
      —
      https://github.com/aszepieniec/falcon-rust/security/advisories/GHSA-25rm-9wvm-m38v
      SSVC assessmentadded
      —
      {"id":"CVE-2026-77382","role":"CISA Coordinator","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"partial"}],"version":"2.0.3","timestamp":"2026-11-19T18:38:52.298404Z"}

      Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0

    2. ReceivedGitHub

      Show 8 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Descriptionadded
      —
      falcon-rust is a Rust implementation of the Falcon post-quantum signature scheme. Prior to 0.2.0, the discrete-Gaussian sampler in src/samplerz.rs evaluates approx_exp, ber_exp, and sampler_z acceptance probabilities with FixedPoint64 values having only 32 fractional bits. The scaling in approx_exp quantizes its input and limits relative precision to about 2^-33, below Falcon's required bound, causing reference known-answer vectors to diverge and invalidating the proof assumption that secret-dependent signature and key distributions are negligibly close to the ideal discrete Gaussian. This is a cryptographic-soundness defect and no practical key-recovery attack has been demonstrated. This issue is fixed in version 0.2.0.
      CVSSadded
      —
      AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
      Weakness type (CWE)added
      —
      CWE-1240
      Affected versions (publisher)added
      —
      New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/77xxx/CVE-2026-77382.json">CVE-2026-77382</a>
      Referenceadded
      —
      https://github.com/aszepieniec/falcon-rust/commit/930d766256f9d67ec9b6d437557286cf47f042ca
      Referenceadded
      —
      https://github.com/aszepieniec/falcon-rust/commit/bf2cf000e63a9803f7ab1a34f629a5a0e9c49cf6
      Referenceadded
      —
      https://github.com/aszepieniec/falcon-rust/releases/tag/v0.2.0
      Referenceadded
      —
      https://github.com/aszepieniec/falcon-rust/security/advisories/GHSA-25rm-9wvm-m38v

      Source identifier: security-advisories@github.com

    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2026-77382
    <a href="https://intel.neosec.eu/en/cve/CVE-2026-77382"><img src="https://intel.neosec.eu/badge/cve/CVE-2026-77382.svg?lang=en" alt="CVE-2026-77382 – NEOSEC Intel" height="20"></a>