CVE-2023-2512

Buffer under-read in workerd

6.5 medium EPSS 0.62%

Published 12 May 2023 Updated 24 Jan 2025 CNA: cloudflare

Check your servers for CVE-2023-2512

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-2023-2512 affects workerd, 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

Prior to version v1.20230419.0, the FormData API implementation was subject to an integer overflow. If a FormData instance contained more than 2^31 elements, the forEach() method could end up reading from the wrong location in memory while iterating over elements. This would most likely lead to a segmentation fault, but could theoretically allow arbitrary undefined behavior.

In order for the bug to be exploitable, the process would need to be able to allocate 160GB of RAM. Due to this, the bug was never exploitable on the Cloudflare Workers platform, but could theoretically be exploitable on deployments of workerd running on machines with a huge amount of memory. Moreover, in order to be remotely exploited, an attacker would have to upload a single form-encoded HTTP request of at least tens of gigabytes in size. The application code would then have to use request.formData() to parse the request and formData.forEach() to iterate over this data. Due to these limitations, the exploitation likelihood was considered Low.

A fix that addresses this vulnerability has been released in version v1.20230419.0 and users are encouraged to update to the latest version available.

Severity (CVSS)

6.5 medium CVSS 3.1 from cloudflare (CNA)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
high: an attack depends on conditions outside the control of the attacker, such as a race
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 low, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.62%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 50.8% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 24 Jan 2025):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Weakness

Affected products

As the CNA lists them.

ProductVersions
workerd
affected from v1.20221108.0 up to and including v1.20230404.0 (unaffected from v1.20230419.0)
Other versions: unaffected

Is my server affected?

Find the installed version of workerd 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 workerd
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-2512 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-2512

RHEL, Rocky, Alma, Fedora

rpm -q workerd
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-2512

Alpine

apk list --installed | grep -i workerd

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-2023-2512
trivy image --scanners vuln IMAGE | grep CVE-2023-2512

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

Other references

Source: the record CVE-2023-2512 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; 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.