Improper Input Validation Affecting @openzeppelin/contracts package, versions >=4.3.0 <4.8.3


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.16% (54th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Input Validation vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-OPENZEPPELINCONTRACTS-5425051
  • published16 Apr 2023
  • disclosed16 Apr 2023
  • creditUnknown

Introduced: 16 Apr 2023

CVE-2023-30542  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade @openzeppelin/contracts to version 4.8.3 or higher.

Overview

@openzeppelin/contracts is a library for contract development.

Affected versions of this package are vulnerable to Improper Input Validation due to missing signatures length validation of the proposal creation entry point (propose) in GovernorCompatibilityBravo, which allows the creation of proposals with a signatures array shorter than the calldatas array. This causes the additional elements of the latter to be ignored, and if the proposal succeeds, the corresponding actions would eventually execute without any calldata. The ProposalCreated event correctly represents what will eventually execute, but the proposal parameters as queried through getActions appear to respect the originally intended calldata.

Workaround

Ensure that all proposals that pass through governance have equal length signatures and calldatas parameters.

CVSS Scores

version 3.1