1. CVE archive
  2. Vulnerability types
  3. CWE-777
CWE-777 · #482 most frequent type in the archive

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.

Part of: CWE-625 · Permissive Regular Expression

7CVEs of this type in the archive
1critical (CVSS ≥ 9)
2high severity (7–8.9)
Nov 30, 2026latest published

What it is

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.

Impact on systems

ScopeImpact
Availability, Confidentiality, Access Control Bypass Protection Mechanism, Varies by Context
An unanchored regular expression in the context of an allowlist will possibly result in a protection mechanism failure. Malicious or malformed data may be included before or after any string matching the regular expression, allowing the data to enter trusted regions of the program. The type of malicious data that is allowed will depend on the context of the application and which anchors are omitted from the regular expression. The specific consequences will depend on what functionality the allowlist was protecting.

How to prevent it

Implementation Be sure to understand both what will be matched and what will not be matched by a regular expression. Anchoring the ends of the expression will allow the programmer to define an allowlist strictly limited to what is matched by the text in the regular expression. If you are using a package that only matches one line by default, ensure that you can match multi-line inputs if necessary.

Source: MITRE CWE catalog · Official entry on the MITRE website

All CWE-777 CVEs

7 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.