CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-77382

CVE-2026-77382: Cryptographic Precision Loss in falcon-rust Discrete-Gaussian Sampler

Amit Schendel
Amit Schendel
Senior Security Researcher

Nov 20, 2026·11 min read·2 visits

Executive Summary (TL;DR)

falcon-rust versions prior to 0.2.0 use 32-bit fractional fixed-point arithmetic in the discrete-Gaussian rejection sampler, truncating exponential polynomial evaluation precision to 2^-33. This violates the 2^-40 minimum precision requirement mandated by the Falcon specification, causes standard Known Answer Tests (KATs) to diverge, and invalidates the Rényi divergence bounds protecting the secret signing key. Upgrading to falcon-rust 0.2.0 restores precision to 2^-50.80 by migrating sampler arithmetic to FixedPoint128.

A cryptographic soundness defect in the discrete-Gaussian sampler of falcon-rust prior to version 0.2.0 degrades acceptance-probability precision to approximately 2^-33. By evaluating exponential approximations using 32-bit fractional fixed-point arithmetic (FixedPoint64) and left-shifting polynomial inputs by 31 bits, the implementation violates Falcon's required precision bound of 2^-40 to 2^-46, invalidating the theoretical security reduction against statistical private key leakage.

Vulnerability Overview

falcon-rust (aszepieniec/falcon-rust) is a pure-Rust implementation of Falcon (Fast-Fourier Lattice-based Compact Signatures over NTRU), a post-quantum digital signature algorithm standardized by NIST. Falcon is constructed on the Gentry-Peikert-Vaikuntanathan (GPV) framework for lattice-based hash-and-sign schemes. The security of the GPV paradigm relies on generating short lattice vectors via Fast Fourier Sampling (ffsampling), which delegates integer sampling to a discrete-Gaussian rejection sampler implemented in src/samplerz.rs.

In versions of falcon-rust prior to 0.2.0, the discrete-Gaussian sampler exhibits a cryptographic soundness flaw tracked as CVE-2026-77382 (GHSA-25rm-9wvm-m38v) and classified under CWE-1240 (Use of a Cryptographic Primitive with a Risky Implementation). When transitioning the codebase away from native IEEE-754 double-precision floating-point arithmetic (f64) to custom fixed-point representations, the internal calculations within sampler_z, ber_exp, and approx_exp were implemented using FixedPoint64, a signed 64-bit integer format configured with 32 integer bits and 32 fractional bits ($Q31.32$).

Evaluating the Gaussian acceptance probability $\rho \approx \text{ccs} \cdot \exp(-x)$ requires multiplying a polynomial argument against 63-bit Chebyshev approximation constants adapted from the FACCT specification. Because FixedPoint64 only retains 32 fractional bits, shifting the value left by 31 bits (<< 31) to align with the 63-bit fixed-point domain zero-filled the lower 31 bits of the polynomial input. This quantized the input grid to $2^{-32}$ and capped the maximum relative precision of approx_exp at approximately $2^{-33}$.

Falcon's security proof relies on Rényi divergence bounds between the implementation's empirical distribution and an ideal discrete Gaussian distribution across a query budget of $2^{64}$ signatures. The cryptographic literature and Falcon specification require a minimum sampler precision between $2^{-40}$ and $2^{-46}$. Operating at $2^{-33}$ precision is at least $128\times$ coarser than the required bound, causing the implementation to fail standard Known Answer Test (KAT) vectors and invalidating the mathematical proof that generated signatures do not leak the private NTRU lattice basis.

Root Cause Analysis

In the Falcon signature scheme, a private key consists of short NTRU polynomials $(f, g, F, G)$ and their corresponding Gram-Schmidt orthogonalized basis tree. During signature generation, the signer maps a message hash to a target point in the lattice and uses randomized rounding via sampler_z to find a nearby lattice vector. To prevent the distribution of signature vectors from revealing the geometry of the private basis (specifically the Gram-Schmidt norms), each integer coordinate must be sampled according to a discrete Gaussian distribution parameterized by center $\mu \in \mathbb{R}$ and standard deviation $\sigma \in [\sigma_{\min}, \sigma_{\max}]$.

The sampler in src/samplerz.rs implements rejection sampling over a bimodal half-Gaussian base distribution (base_sampler). For a candidate sample $z = b + (2b - 1)z_0$, the algorithm computes the distance term $x$ and scaling factor $\text{ccs}$:

$$x = \frac{(z - r)^2}{2\sigma^2} - \frac{z_0^2}{2\sigma_{\max}^2}, \quad \text{ccs} = \frac{\sigma_{\min}}{\sigma}$$

where $r = \mu - \lfloor \mu \rfloor$ is the fractional part of the Gaussian center. The candidate $z$ is accepted with probability $\text{ccs} \cdot \exp(-x)$ via the Bernoulli exponential routine ber_exp(x, ccs).

Within ber_exp, the argument $x$ is decomposed via range reduction into $x = s \cdot \ln(2) + r$, where $s = \lfloor x / \ln(2) \rfloor$ is an integer shift amount and $r \in [0, \ln 2)$ is the residual passed to approx_exp(r, ccs). In the vulnerable code path, sampler_z computed $r$, $x$, and $\text{ccs}$ using FixedPoint64. Furthermore, ber_exp executed the range reduction $r = x - s \cdot \ln(2)$ using FixedPoint64::LN_2, which itself only carried 32 fractional bits.

The critical truncation occurred inside approx_exp(x: FixedPoint64, ccs: FixedPoint64) -> u64. This function evaluates a degree-11 polynomial in Horner form using 63-bit unsigned integer coefficients $C_0, \dots, C_{11}$ scaled by $2^{63}$. Because the input x.0 was scaled by $2^{32}$, the implementation converted x.0 to the $2^{63}$ scale via (x.0 as u64) << 31. Similarly, ccs.0 was scaled via (ccs.0 as u64) << 31.

Because x.0 contained zero information below the $2^{-32}$ bit position, left-shifting by 31 bits populated bits $0$ through $30$ of the 63-bit operand z with zeroes. Multiplying a 32-bit quantized operand against 63-bit polynomial coefficients rendered the lower precision of the FACCT coefficients ineffective. The error analysis of approx_exp over $[0, \ln 2]$ confirmed a maximum relative error of $2^{-33.00}$. During initial development, this defect caused unit tests comparing approx_exp against f64::exp to fail, which was previously masked in the test suite by widening the allowed assertion tolerance from $2^{23}$ to $2^{40}$ units in the last place (ULP) at the $2^{63}$ scale.

Code Analysis

The vulnerability was introduced during the replacement of floating-point primitives with fixed-point arithmetic and remediated in commit 930d766256f9d67ec9b6d437557286cf47f042ca. The fix upgrades the precision of the entire acceptance-probability pipeline in src/samplerz.rs from FixedPoint64 ($Q31.32$, backed by i64) to FixedPoint128 ($Q63.64$, backed by i128).

First, src/fixed_point.rs was updated to provide a lossless widening conversion from FixedPoint64 to FixedPoint128 by shifting the underlying 64-bit integer left by 32 bits into a 128-bit signed integer:

// src/fixed_point.rs
/// Widen FixedPoint64 (scale 2^32) to FixedPoint128 (scale 2^64). Lossless: the extra
/// 32 fractional bits are zero. Used by the discrete-Gaussian sampler to evaluate the
/// acceptance probability at full (64-bit) precision.
impl From<FixedPoint64> for FixedPoint128 {
    fn from(v: FixedPoint64) -> FixedPoint128 {
        FixedPoint((v.0 as i128) << 32)
    }
}

In src/samplerz.rs, sampler_z immediately widens the incoming mu, sigma, and sigma_min parameters to FixedPoint128 before performing any divisions or quadratic distance calculations. Consequently, intermediate variables such as isigma ($1/\sigma$), dss ($1/(2\sigma^2)$), inv_2sigma_max_sq ($1/(2\sigma_{\max}^2)$), and the rejection argument x retain 64 bits of fractional precision rather than truncating at 32 bits:

// src/samplerz.rs - Patched sampler_z initialization
pub(crate) fn sampler_z(
    mu: FixedPoint64,
    sigma: FixedPoint64,
    sigma_min: FixedPoint64,
    rng: &mut dyn Rng,
) -> i16 {
    // Widen inputs from Q31.32 to Q63.64 prior to division and multiplication
    let mu = FixedPoint128::from(mu);
    let sigma = FixedPoint128::from(sigma);
    let sigma_min = FixedPoint128::from(sigma_min);
    let sigma_max = FixedPoint128::from(1.8205f64);
    let inv_2sigma_max_sq =
        FixedPoint128::ONE / (FixedPoint128::from(2.0f64) * sigma_max * sigma_max);
    let isigma = FixedPoint128::ONE / sigma;
    let dss = FixedPoint128::from(0.5f64) * isigma * isigma;
    let s = mu.floor().trunc();
    let r = mu - FixedPoint128::from(s);
    let ccs = sigma_min * isigma;
    // ...

Within ber_exp and approx_exp, the parameters are updated to FixedPoint128. Because a FixedPoint128 value x.0 represents $\lfloor x_{\text{real}} \cdot 2^{64} \rfloor$, converting it to the $2^{63}$ scale required by the FACCT polynomial constants is achieved by shifting right by 1 bit ((x.0 >> 1) as u64) instead of shifting left by 31 bits:

// src/samplerz.rs - Vulnerable vs. Patched approx_exp
fn approx_exp(x: FixedPoint128, ccs: FixedPoint128) -> u64 {
    let C: [u64; 12] = [
        0x00000004741183A3,
        0x00000036548CFC06,
        0x0000024FDCBF140A,
        0x0000171D939DE045,
        0x0000D00CF58F6F84,
        0x000680681CF796E3,
        0x002D82D8305B0FEA,
        0x011111110E066FD0,
        0x0555555555070F00,
        0x155555555581FF00,
        0x400000000002B400,
        0x7FFFFFFFFFFF4800,
    ];
 
    let mut y: u64 = C[0];
    // VULNERABLE: let z: u64 = if x.0 < 0 { 0 } else { (x.0 as u64) << 31 };
    // PATCHED: x.0 is scaled by 2^64. Right shift by 1 scales to 2^63 while preserving all 63 fractional bits.
    let z: u64 = if x.0 < 0 { 0 } else { (x.0 >> 1) as u64 };
    for cu in C.iter().skip(1) {
        let zy = (z as u128) * (y as u128);
        y = cu - ((zy >> 63) as u64);
    }
 
    // VULNERABLE: let z2: u64 = if ccs.0 < 0 { 0 } else { (ccs.0 as u64) << 31 };
    // PATCHED: ccs.0 is scaled by 2^64; shift right by 1 to retain 63 bits of precision.
    let z2: u64 = if ccs.0 < 0 { 0 } else { (ccs.0 >> 1) as u64 };
 
    (((z2 as u128) * (y as u128)) >> 63) as u64
}

> [!NOTE] > Regarding fix completeness, sampler_z retains its external signature accepting mu, sigma, and sigma_min as FixedPoint64. While widening these inputs inside sampler_z restores full 63-bit precision to the division, squaring, range reduction, and exponential evaluation steps, the initial input parameters passed from ffsampling remain quantized to $2^{-32}$ at the function boundary.

Exploitation and Cryptographic Attack Surface

There are no known functional exploits or proof-of-concept key-recovery scripts targeting CVE-2026-77382 in the wild. Because the defect resides in the statistical fidelity of a post-quantum rejection sampler rather than a memory safety violation or logic bypass, exploitation requires passive collection of valid digital signatures followed by lattice cryptanalysis.

In a theoretical attack scenario, an unauthenticated remote adversary collects a large transcript of message-signature pairs $(m_i, s_i)$ generated by a target using falcon-rust < 0.2.0 under a single static public/private key pair. No special privileges, user interaction, or specific runtime configurations are required beyond access to signatures produced by the vulnerable library.

In GPV lattice signature schemes, each signature vector $\mathbf{s}$ is sampled around a target center determined by the message hash using the private Gram-Schmidt orthogonalized basis. In an ideal discrete Gaussian sampler with sufficient precision ($\ge 2^{-40}$), the resulting signature distribution is statistically independent of the private key basis up to a bounded Rényi divergence across $Q \le 2^{64}$ signing queries.

When the exponential acceptance probability $\text{ccs} \cdot \exp(-x)$ is truncated to $2^{-33}$ relative accuracy, candidate integers $z$ near rejection thresholds experience systematic acceptance bias. Over a sufficiently large sample of signatures, the empirical covariance and higher-order moments of the signature vectors deviate from the ideal spherical Gaussian distribution. In lattice cryptanalysis (such as Nguyen-Regev style parallelepiped learning or statistical covariance attacks), subtle biases correlated with the fractional offset $r = \mu - \lfloor \mu \rfloor$ and the local standard deviation $\sigma$ can leak approximations of the secret Gram-Schmidt norms, potentially reducing the lattice dimension or enabling recovery of the secret NTRU polynomials $(f, g, F, G)$.

Impact Assessment

CVE-2026-77382 is assigned a CVSS v3.1 base score of 5.9 (Medium) with the vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N. The Attack Vector is Network (AV:N) with no Privileges Required (PR:N) and no User Interaction (UI:N), reflecting that digital signatures are typically exposed publicly over network protocols (e.g., blockchain transactions, TLS handshakes, or artifact signing). Attack Complexity is rated High (AC:H) because translating a $2^{-33}$ vs. $2^{-40}$ Rényi divergence gap into a practical private key recovery requires collecting massive signature transcripts and executing computationally intensive statistical lattice attacks.

The primary security impact is High Confidentiality loss (C:H) relative to the secret signing key material. If an adversary successfully exploits the statistical leakage to reconstruct the private NTRU basis, they can forge arbitrary Falcon signatures for any message under the compromised public key. In the CVSS assessment, direct Integrity (I:N) and Availability (A:N) impacts are scored as None because the sampler flaw does not directly corrupt memory, crash the verifier, or allow signature forgery without first breaking the confidentiality of the private key via cryptanalysis.

Beyond theoretical key leakage, the vulnerability has an immediate functional and compliance impact on systems requiring strict adherence to the Falcon specification. Because rejection decisions diverge on boundary inputs where the random comparison value falls within the $2^{-33}$ error margin, falcon-rust < 0.2.0 fails standard deterministic Known Answer Tests (KATs), breaking deterministic signature reproducibility across compliant Falcon implementations.

Remediation and Mitigation

Users and downstream projects depending on falcon-rust must upgrade to version 0.2.0 or later, which incorporates commit 930d766256f9d67ec9b6d437557286cf47f042ca. In version 0.2.0, the maximum relative error of approx_exp across $10^6$ grid points in $[0, \ln 2]$ is reduced to $2^{-50.80}$ (an average error of $\approx 1054$ ULP at scale $2^{63}$), exceeding the $2^{-40}$ minimum precision requirement by more than 10 bits.

To apply the fix in a Rust project, update Cargo.toml to require falcon-rust = "^0.2.0" and run cargo update -p falcon-rust. Developers building from source should verify that their build includes the regression test approx_exp_meets_falcon_precision in src/samplerz.rs, which asserts at test time that max_rel_err < 2.0f64.powi(-40).

// Verification test included in falcon-rust >= 0.2.0
#[test]
fn approx_exp_meets_falcon_precision() {
    let samples = 1_000_000u64;
    let ln2 = core::f64::consts::LN_2;
    let ccs_fp = FixedPoint128::ONE;
    let mut max_rel_err: f64 = 0.0;
    for i in 0..=samples {
        let x_real = (i as f64 / samples as f64) * ln2;
        let x_fp = FixedPoint128::from(x_real);
        let got = approx_exp(x_fp, ccs_fp) as f64 / (1u64 << 63) as f64;
        let want = (-x_real).exp();
        let rel_err = ((got - want) / want).abs();
        if rel_err > max_rel_err {
            max_rel_err = rel_err;
        }
    }
    let bound = 2.0f64.powi(-40);
    assert!(max_rel_err < bound);
}

If immediate upgrading is not possible, limit the number of signatures generated under any single private key to minimize statistical transcript exposure. For high-assurance environments where a private signing key was used with falcon-rust < 0.2.0 to generate large volumes of publicly observable signatures, key rotation is recommended after upgrading to version 0.2.0 to ensure all active keys operate strictly within Falcon's proven Rényi divergence bounds.

Official Patches

aszepieniec (GitHub)Patch promoting sampler_z acceptance probability evaluation to FixedPoint128
aszepieniec (GitHub)falcon-rust v0.2.0 official release

Fix Analysis (2)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected Systems

falcon-rust (< 0.2.0)

Affected Versions Detail

Product
Affected Versions
Fixed Version
falcon-rust
aszepieniec
< 0.2.0 (v0.1.0, v0.1.1, v0.1.2)0.2.0
AttributeDetail
CVE / Advisory IDCVE-2026-77382 / GHSA-25rm-9wvm-m38v
Weakness ClassCWE-1240: Use of a Cryptographic Primitive with a Risky Implementation
CVSS v3.1 Score5.9 Medium (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N)
Affected Componentsrc/samplerz.rs (approx_exp, ber_exp, sampler_z)
Precision Degradation2^-33 relative error (vs. Falcon mandated 2^-40 to 2^-46)
Patched Precision2^-50.80 maximum relative error via FixedPoint128 (Q63.64)
Exploit StatusNone (Cryptographic security proof invalidation)
Fixed Versionfalcon-rust 0.2.0

MITRE ATT&CK Mapping

T1552Unsecured Credentials
Credential Access
CWE-1240
Use of a Cryptographic Primitive with a Risky Implementation

The product uses a cryptographic primitive with a degraded or non-standard implementation that fails to meet required mathematical precision or security bounds, weakening the theoretical guarantees of the cryptosystem.

Vulnerability Timeline

Commit bf2cf000e63a9803f7ab1a34f629a5a0e9c49cf6 replaces native f64 arithmetic with custom FixedPoint types.
2026-04-28
Commit 930d766256f9d67ec9b6d437557286cf47f042ca authored to promote Gaussian acceptance probability evaluation to FixedPoint128.
2026-07-11
GitHub Security Advisory GHSA-25rm-9wvm-m38v and CVE-2026-77382 published; falcon-rust v0.2.0 released.
2026-11-19

References & Sources

  • [1]GitHub Security Advisory GHSA-25rm-9wvm-m38v
  • [2]Fix Commit: evaluate the Gaussian acceptance probability at 64-bit precision
  • [3]Commit: Eliminate f64 from key generation via generic FixedPoint<T>
  • [4]falcon-rust Release v0.2.0
  • [5]CVE.org Record: CVE-2026-77382
  • [6]NVD Detail: CVE-2026-77382
  • [7]CVE List V5 Record: CVE-2026-77382

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-77378
6.5

CVE-2026-77378: Authenticated SQL Injection in Bolt CMS ListFormatHelper

CVE-2026-77378 (GHSA-r7h9-qx4h-77j5) is an authenticated SQL injection vulnerability affecting the bolt/core package of Bolt CMS in versions prior to 6.1.4. The flaw resides in the ListFormatHelper utility class, where content-type slugs are dynamically interpolated into raw SQL query strings via sprintf rather than bound as parameterized inputs. When the general/caching/list_format configuration directive is enabled, an authenticated user with upload privileges can exploit the /async/select-options endpoint to inject arbitrary SQL commands and query the underlying database.

Alon Barad
Alon Barad
1 views•11 min read
•about 3 hours ago•CVE-2026-62955
7.2

CVE-2026-62955: Authenticated Path Traversal and Remote Code Execution via realpath() Bypass in baserCMS BcThemeFileService

CVE-2026-62955 is an authenticated path traversal vulnerability in baserCMS affecting versions 5.2.3 up to, but not including, 5.3.0. The flaw resides in the BcThemeFileService::getFullpath() method within the bc-theme-file plugin and represents an incomplete remediation of CVE-2026-30940. Because the path containment check relies on PHP's realpath() returning a non-false value, supplying a nonexistent theme subdirectory causes the verification guard to be skipped entirely. An authenticated administrator can exploit this flaw to read, write, overwrite, or delete arbitrary files within the permissions of the PHP process, leading to remote code execution when executable PHP files are written to the webroot.

Amit Schendel
Amit Schendel
3 views•11 min read
•about 4 hours ago•CVE-2026-63012
6.5

CVE-2026-63012: Authorization Bypass and Information Disclosure in baserCMS Administrative API

CVE-2026-63012 is an authorization bypass and information disclosure vulnerability in baserCMS versions prior to 5.3.0. An architectural flaw in the authentication service configuration combined with overly permissive API access control rules allows low-privileged operator accounts to query restricted administrative API endpoints by supplying a matching HTTP Referer header.

Alon Barad
Alon Barad
2 views•9 min read
•about 5 hours ago•CVE-2026-102945
4.9

CVE-2026-102945: Unrecovered Goroutine Panic via Malformed NGAP PathSwitchRequest in Aether Project AMF

CVE-2026-102945 is a denial-of-service vulnerability affecting the Access and Mobility Management Function (AMF) of the Aether Project (omec-project/amf) prior to version 3.1.6. When processing an NGAP PathSwitchRequest message over the 3GPP N2 interface, the HandlePathSwitchRequest function fails to verify the byte slice lengths of extensible APER bit strings inside the UESecurityCapabilities Information Element before accessing index zero. Because the NGAP receive goroutine lacks a panic recovery handler, supplying a zero-length bit string triggers an out-of-bounds slice read panic that terminates the entire AMF daemon.

Amit Schendel
Amit Schendel
1 views•11 min read
•about 6 hours ago•CVE-2026-103025
8.7

CVE-2026-103025: Unbounded Memory Allocation and Decompression Bomb in bep/imagemeta PNG Parser

CVE-2026-103025 (GHSA-7hvw-3c2q-45qg) is a high-severity denial-of-service (DoS) vulnerability in github.com/bep/imagemeta prior to version 0.17.3. The PNG metadata parser fails to validate declared chunk lengths prior to heap buffer allocation (CWE-789) and inflates zlib-compressed zTXt IPTC chunks without an output size limit (CWE-409). Additionally, out-of-bounds slice indexing in the PNG zTXt handler and IPTC character set resolver allows remote attackers to trigger runtime panics.

Amit Schendel
Amit Schendel
2 views•1 min read
•about 7 hours ago•CVE-2026-103033
5.3

CVE-2026-103033: Pre-Verification Nil-Map Panic and Denial of Service in ALTCHA Go Library

CVE-2026-103033 (GHSA-gfwj-45pc-w6r5) is an unauthenticated pre-verification Denial of Service (DoS) vulnerability in the Go implementation of the ALTCHA bot-prevention library (github.com/altcha-org/altcha-lib-go). In versions 2.0.0 and 2.0.1, the internal function parseServerSignature conditionally initializes the ServerSignatureVerificationData.Extra map only when url.ParseQuery returns no error. When an attacker submits a payload containing both an unrecognized query parameter and malformed percent-encoding in the VerificationData field, url.ParseQuery returns partially parsed parameters alongside an error. Because execution continues without initializing the Extra map, the subsequent loop attempts to write unknown parameters into a nil map, triggering a fatal Go runtime panic before cryptographic signature verification occurs.

Alon Barad
Alon Barad
3 views•10 min read