Memory exhaustion when compiling regular expressions in regexp/syntax
Historical advisory saved 24 Oct 2026 13:19:41 UTC. The publisher may have updated it since then. Latest advisory.
osv · GO-2022-1039
PublishedPrograms 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.
- Source published
- 6 Oct 2022 16:42:07 UTC
- Source modified
- 15 Jul 2026 14:29:33 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.