---
title: "CVE-2024-36400: Unable to generate the correct character set"
url: https://erroneo.us/security/cve/CVE-2024-36400/
description: "CVE-2024-36400 (nano-id (crates.io (Rust))): nano-id is a unique string ID generator for Rust. Affected versions of the nano-id crate incorrectly generated…"
type: vulnerability-record
section: "Security Digest"
date_published: 2024-06-04
date_modified: 2024-08-02
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2024-36400"
kev: false
cvss: 9.4
epss: 0.00754
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2024-36400: Unable to generate the correct character set

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 0.8% , percentile 55: FIRST’s model estimates a 0.8% chance of exploitation activity in the next 30 days, higher than 55% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes nano-id (crates.io (Rust)) < 0.4.0, fixed in 0.4.0 . Check your lockfile, including transitive dependencies.

## What it is

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 nanoid::base62 and nanoid::base58 functions. Specifically, the base62 function used a character set of 32 symbols 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 nanoid::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 nanoid::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.

## Affected packages

- crates.io (Rust) `nano-id` < 0.4.0 → fixed: 0.4.0

## Affected products (CVE record)

- viz-rs nano-id: < 0.4.0

## Severity

- GitHub_M CVSS 3.1: 9.4 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L`
- GitHub CVSS 3.1: 9.4 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.75% probability of exploitation activity in the next 30 days; percentile 55.

## Sources

- [GitHub Advisory GHSA-9hc7-6w9r-wj94](https://github.com/advisories/GHSA-9hc7-6w9r-wj94)
- [CVE.org record CVE-2024-36400](https://www.cve.org/CVERecord?id=CVE-2024-36400)
- [NVD entry CVE-2024-36400](https://nvd.nist.gov/vuln/detail/CVE-2024-36400)
- [github.com](https://github.com/viz-rs/nano-id/security/advisories/GHSA-9hc7-6w9r-wj94)
- [github.com](https://github.com/viz-rs/nano-id/commit/a9022772b2f1ce38929b5b81eccc670ac9d3ab23)
- [rustsec.org](https://rustsec.org/advisories/RUSTSEC-2024-0343.html)

---
Source page: https://erroneo.us/security/cve/CVE-2024-36400/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
