Skip to content

← Actionable
Critical, CVSS 9.4

Unable to generate the correct character set

CVE-2024-36400GHSA-9hc7-6w9r-wj94

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (nano-id 0.4.0), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • crates.io nano-id

    Affected
    < 0.4.0
    Fixed in
    0.4.0

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
9.4 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
EPSS
  • CVE-2024-36400: 0.75% estimated exploitation activity in the next 30 days; percentile 55.13 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Reduced entropy due to inadequate character set usage Description 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. Impact 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. Patches The flaws were corrected in commit a9022772b2f1ce38929b5b81eccc670ac9d3ab23 by updating the the nanoid::gen macro to use all specified…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-9hc7-6w9r-wj94

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2024-36400

Advisory: Unable to generate the correct character set
IDs: CVE-2024-36400, GHSA-9hc7-6w9r-wj94
Record: https://patchnext.com/advisories/cve-2024-36400 (revision 1, source checked 26 Oct 2026, 15:38 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Critical (CVSS 9.4)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: nano-id 0.4.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- crates.io nano-id: affected < 0.4.0; fixed in 0.4.0

## Suggested inspection (read-only)
- crates.io nano-id: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on nano-id.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-9hc7-6w9r-wj94 (GitHub-reviewed advisory GHSA-9hc7-6w9r-wj94 lists affected ranges: crates.io nano-id >=0 <0.4.0)

Commands are suggestions: review each one before running it.

Loading voting…