Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

CVE-2024-27094: OpenZeppelin Contracts is a library for secure smart contract development

42
This month
MEDIUM 6.5REMOTEUPGRADEUPGRADE

CVE-2024-27094 is a medium-severity flaw (CVSS 6.5) affecting contracts, contracts upgradeable. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.

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.

Why this priority

  • Remotely exploitable, no login, no user action

A fixed release or distro patch exists.

Risk facts

CVSS score6.5 (Medium)
Attack vectorNetwork (remote)
Attack complexityHigh
Privileges neededNone
User interactionNone
EPSS exploit chance0.8% (top 45%)
CISA exploited listNo
WeaknessCWE-125
Published2024-03-21
Last modified2026-06-17
Publisher (CNA): GitHub, Inc. · Vendor: openzeppelin

Share: LinkedIn · X · Reddit

Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score

Am I affected?

Timeline

openzeppelin contracts UPGRADE
Affected: >= 4.5.0 and < 4.9.6 · >= 5.0.0 and < 5.0.2
Fixed in: 4.9.6, 5.0.2
Safe to downgrade to: a release before 4.5.0
1. Check installed version
npm ls contracts
2. UPGRADE to 4.9.6
npm install contracts@">=4.9.6"
3. If no update is available yet, DOWNGRADE to a release before 4.5.0
npm view contracts versions npm install contracts@"<4.5.0"
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.
openzeppelin contracts upgradeable UPGRADE
Affected: >= 4.5.0 and <= 4.9.6 · >= 5.0.0 and < 5.0.2
Fixed in: 5.0.2
Safe to downgrade to: a release before 4.5.0
1. Check installed version
npm ls contracts-upgradeable
2. UPGRADE to 5.0.2
npm install contracts-upgradeable@">=5.0.2"
3. If no update is available yet, DOWNGRADE to a release before 4.5.0
npm view contracts-upgradeable versions npm install contracts-upgradeable@"<4.5.0"
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.
Verify at the official source NVD · CVE Program · Report a problem with this page
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.

Quick answers

How do I fix CVE-2024-27094?

contracts: upgrade to 4.9.6, 5.0.2; contracts upgradeable: upgrade to 5.0.2. Exact commands for each OS are on this page.

Is CVE-2024-27094 being exploited?

CVE-2024-27094 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.

What does CVE-2024-27094 affect?

CVE-2024-27094 affects contracts, contracts upgradeable. Severity is medium (CVSS 6.5). 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 p

How urgent is CVE-2024-27094?

Priority 42/100. Remotely exploitable, no login, no user action

Related CVEs

References

← Back to latest CVEs

Get the weekly exploited-CVE digest by emailThe CVEs being attacked this week and how to fix them. No spam, unsubscribe any time.