Katalog CWE

CWE-625 · Słabość

Permissive Regular Expression

Abstrakcja
Bazowa
Status
Szkic
Dodano
7 maja 2007
Ostatnia zmiana
29 czerwca 2023

Podatności CVE z tą słabościąPełny wpis na cwe.mitre.org ↗

Opis

The product uses a regular expression that does not sufficiently restrict the set of allowed values.

This effectively causes the regexp to accept substrings that match the pattern, which produces a partial comparison to the target. In some cases, this can lead to other weaknesses. Common errors include:

- not identifying the beginning and end of the target string

- using wildcards instead of acceptable character ranges

- others

Skutki

  • Access Control

    Bypass Protection Mechanism

Zapobieganie

  • Implementation

    When applicable, ensure that the regular expression marks beginning and ending string patterns, such as "/^string$/" for Perl.

Przykłady podatności

Słabość nadrzędna

Pokrewna

Słabości podrzędne

Kiedy powstaje

Dotyczy

Perl, PHP

Źródła

  1. The Art of Software Security Assessment — Mark Dowd, John McDonald, Justin Schuh, Chapter 8, "Character Stripping Vulnerabilities", Page 437, Addison Wesley, 2006

Wpis z katalogu CWE 4.20.