Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

CVE-2024-27094

MEDIUM

OpenZeppelin Contracts base64 encoding may read from potentially dirty memory

Also known asGHSA-9vx6-7xxf-x967
Published
Feb 29, 2024
Updated
Apr 10, 2026
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
0.8%probability of exploitation in next 30 days
Lower Risk51th percentile+0.20%
0.00%0.42%0.84%1.26%0.2%0.8%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

4 pkgs affected

Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.

@openzeppelin/contractsnpm
1.0Mdownloads / week
@openzeppelin/contracts-upgradeablenpm
264Kdownloads / week

Description

OpenZeppelin Contracts is a library for secure smart contract development. The Base64.encode function encodes a bytes input by iterating over it in chunks of 3 bytes. When this input is not a multiple of 3, the last iteration may read parts of the memory that are beyond the input buffer. The vulnerability is fixed in 5.0.2 and 4.9.6.

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
📦npm@openzeppelin/contracts4.5.0&&< 4.9.64.9.6
📦npm@openzeppelin/contracts-upgradeable5.0.0-rc.0&&< 5.0.25.0.2
📦npm@openzeppelin/contracts5.0.0-rc.0&&< 5.0.25.0.2
📦npm@openzeppelin/contracts-upgradeable4.5.0&&< 4.9.64.9.6

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @openzeppelin/contracts. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @openzeppelin/contracts to 4.9.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-27094 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2024-27094 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2024-27094. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

OpenZeppelin Contracts is a library for secure smart contract development. The `Base64.encode` function encodes a `bytes` input by iterating over it in chunks of 3 bytes. When this input is not a multiple of 3, the last iteration may read parts of the memory that are beyond the input buffer. The vulnerability is fixed in 5.0.2 and 4.9.6.
O3 Security · Impact-Aware SCA

Is CVE-2024-27094 in your dependencies?

O3 detects CVE-2024-27094 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.