Live threats

All CVEs / Golang

CVE-2022-41715Golang Go

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
1.6%
probability of exploitation in 30 days · percentile 76
Auth required
No
Published
Oct 14, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

Programs which compile regular expressions from untrusted sources may be vulnerable to memory exhaustion or denial of service. The parsed regexp representation is linear in the size of the input, but in some cases the constant factor can be as high as 40,000, making relatively small regexps consume much larger amounts of memory. After fix, each regexp being parsed is limited to a 256 MB memory footprint. Regular expressions whose representation would use more space than that are rejected. Normal use of regular expressions is unaffected.

Original NVD text.

What to do

  1. Apply the vendor's security update for Go.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Go stdlib < 1.18.7 1.18.7 go get stdlib@v1.18.7
Go stdlib ≥ 1.19.0-0 < 1.19.2 1.19.2 go get stdlib@v1.19.2

Per OSV / GitHub Advisories (GO-2022-1039). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
golanggo< 1.18.7
golanggo≥ 1.19.0 < 1.19.2

Official advisories

Also: Red Hat (+1)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.