CVE-2021-41272

SHL, SHR, and SAR operations trigger native exception at key values in besu

7.5 high EPSS 1.46%

Published 13 Dec 2021 Updated 4 Aug 2024 CNA: GitHub_M

Check your servers for CVE-2021-41272

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-41272 affects besu, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

Besu is an Ethereum client written in Java. Starting in version 21.10.0, changes in the implementation of the SHL, SHR, and SAR operations resulted in the introduction of a signed type coercion error in values that represent negative values for 32 bit signed integers. Smart contracts that ask for shifts between approximately 2 billion and 4 billion bits (nonsensical but valid values for the operation) will fail to execute and hence fail to validate. In networks where vulnerable versions are mining with other clients or non-vulnerable versions this will result in a fork and the relevant transactions will not be included in the fork. In networks where vulnerable versions are not mining (such as Rinkeby) no fork will result and the validator nodes will stop accepting blocks. In networks where only vulnerable versions are mining the relevant transaction will not be included in any blocks. When the network adds a non-vulnerable version the network will act as in the first case. Besu 21.10.2 contains a patch for this issue. Besu 21.7.4 is not vulnerable and clients can roll back to that version. There is a workaround available: Once a transaction with the relevant shift operations is included in the canonical chain, the only remediation is to make sure all nodes are on non-vulnerable versions.

Severity (CVSS)

7.5 high CVSS 3.1 from GitHub_M (CNA)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
low: an attack works without special conditions
Privileges required
none: the attacker does not need an account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 1.46%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 73.9% of all scored CVEs. Scores of 29 Nov 2026.

Weakness

  • CWE-681 Incorrect Conversion between Numeric Types

Affected products

As the CNA lists them.

ProductVersions
besu
affected > 21.7.4, < 21.10.2

Is my server affected?

Find the installed version of besu and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i besu
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-41272 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-41272

RHEL, Rocky, Alma, Fedora

rpm -q besu
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-41272

Alpine

apk list --installed | grep -i besu

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2021-41272
trivy image --scanners vuln IMAGE | grep CVE-2021-41272

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Other references

Source: the record CVE-2021-41272 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.