CWE-777: Regular Expression without Anchors
The product uses a regular expression to perform neutralization, but the regular expression omits one or more anchors that may allow malicious or malformed data to slip through.
Last updated
Overview
CWE-777 (Regular Expression without Anchors) is a variant-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Background
Regular expressions are typically used to match a pattern of text. Anchors are used in regular expressions to specify where the pattern should match: at the beginning, the end, or both (the whole input). When performing tasks such as validating against a set of allowed inputs (allowlist), data is examined and possibly modified to ensure that it is well-formed and adheres to a list of safe values.
Real-world CVEs
6 recorded CVEs are caused by CWE-777 (Regular Expression without Anchors). The highest-severity and most recent are shown first. 6 new CWE-777 CVEs have been recorded so far in 2026.