CVE-2022-41715: Programs which compile regular expressions from untrusted sources may be vulnerable to memory exhaustion or denial of service.
High CVSS 7.5
- CVE id
- CVE-2022-41715
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Go Runtimes and servers |
< 1.18.7 >= 1.19.0, < 1.19.2 |
1.18.7, 1.19.2 |
How to fix it
Upgrade Go to the fixed release of the line you run: 1.18.7, 1.19.2.
go version
- Build with the patched Go release (set "toolchain" in go.mod, or the golang image tag) and redeploy: Go programs include the standard library, so they must be rebuilt.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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.
References
- CVE-2022-41715 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2022-41715
- Web: https://go.dev/cl/439356
- Web: https://go.dev/issue/55949
- Web: https://groups.google.com/g/golang-announce/c/xtuG5faxtaU
- Web: https://pkg.go.dev/vuln/GO-2022-1039
- Web: https://security.gentoo.org/glsa/202311-09
- Web: https://go.dev/cl/439356
- Web: https://go.dev/issue/55949
- Web: https://groups.google.com/g/golang-announce/c/xtuG5faxtaU
- Web: https://pkg.go.dev/vuln/GO-2022-1039
- Web: https://security.gentoo.org/glsa/202311-09
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.