Cyber Resilience

CVE-2024-36400

Viz Nano Id ≤ 0.4.0

Public PoC
Published
04 June 2024
Modified
21 November 2024
Patch / advisory
CVSS Score v3.1 9.4
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
EPSS Score 0.0075 51th percentile
Risk Priority 70 floored blend · peak EPSS

Summary

CVE-2024-36400 is a critical-severity Insufficient Entropy (CWE-331) vulnerability in Viz Nano Id. Its CVSS base score is 9.4 (Critical).

Operationally, ranked in the top 49% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

nano-id is a unique string ID generator for Rust. Affected versions of the nano-id crate incorrectly generated IDs using a reduced character set in the `nano_id::base62` and `nano_id::base58` functions. Specifically, the `base62` function used a character set of 32 symbols…

more

instead of the intended 62 symbols, and the `base58` function used a character set of 16 symbols instead of the intended 58 symbols. Additionally, the `nano_id::gen` macro is also affected when a custom character set that is not a power of 2 in size is specified. It should be noted that `nano_id::base64` is not affected by this vulnerability. This can result in a significant reduction in entropy, making the generated IDs predictable and vulnerable to brute-force attacks when the IDs are used in security-sensitive contexts such as session tokens or unique identifiers. The vulnerability is fixed in 0.4.0.

CWE(s)

Related Threats

CVEs Like This One

CVE-2026-34236Shared CWE-331
CVE-2023-46648Shared CWE-331
CVE-2023-31582Shared CWE-331
CVE-2024-38270Shared CWE-331
CVE-2024-25730Shared CWE-331
CVE-2025-15387Shared CWE-331
CVE-2025-14261Shared CWE-331
CVE-2026-7210Shared CWE-331
CVE-2023-34973Shared CWE-331
CVE-2026-11403Shared CWE-331

Affected Assets

viz
nano id
≤ 0.4.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 6 hardening rules · 3 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V6.5.2
  • V11.3.4

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-331

Approved key-establishment methods mandate sufficient entropy during key generation, eliminating entropy-starved keys.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices explicitly include vetted RNG and entropy sources, directly preventing this weakness while covering many other development concerns.

PR.AA-03 partial match
prevents

Password-strength policies implicitly require sufficient entropy, but the control addresses authentication rather than algorithmic randomness.

PR.DS-01 partial match
prevents

Proper encryption for data-at-rest requires sufficient entropy for keys/nonces; eliminating the weakness therefore supports but does not fully realize the control.

PR.DS-02 partial match
prevents

Cryptographic protection of data-in-transit depends on adequate entropy; the weakness directly undermines the control's effectiveness.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

prevents

Mandates use of cryptography that must rely on sufficient entropy sources.

detects

Security testing can detect insufficient-entropy defects before release.

prevents

Secure-SDLC activities include entropy validation during design and testing.

prevents

Secure-coding rules can explicitly forbid weak random-number generation.

degrades

Requires secure authentication mechanisms that depend on unpredictable secrets.

Hardening callouts derived

Configuration rules from DISA STIG baselines that reduce the attack surface for weaknesses of the type cited by this CVE. Derived transitively via CVE→CWE→STIG over `controls_xwalks` (authoritative rows only).

Oracle Linux 8 (1 rule)
  • V-248524 OL 8 must implement NIST FIPS-validated cryptography for the following: To provision digital signatures, to generate cryptographic hashes, and to protect data requiring data-at-rest protections in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards. via CWE-331
RHEL 8 (1 rule)
  • V-230223 RHEL 8 must implement NIST FIPS-validated cryptography for the following: To provision digital signatures, to generate cryptographic hashes, and to protect data requiring data-at-rest protections in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards. via CWE-331

References