Skip to content
OpenAdvisories

Weakness (CWE)

CWE-624: Executable Regular Expression Error

Base Incomplete

The product uses a regular expression that either (1) contains an executable component with user-controlled inputs, or (2) allows a user to enable execution by inserting pattern modifiers.

More detail

Case (2) is possible in the PHP preg_replace() function, and possibly in other languages when a user-controlled input is inserted into a string that is later parsed as a regular expression.

How to prevent it (1 mitigation)
  1. Implementation

    The regular expression feature in some languages allows inputs to be quoted or escaped before insertion, such as \Q and \E in Perl.

Source: MITRE CWE-624

4 results · Feed

  • High 7.5

    HTTP::Headers::ActionPack versions before 0.10 for Perl allow CPU exhaustion via Accept-Language ranges matched as regular expressions

    HTTP::Headers::ActionPack versions before 0.10 for Perl allow CPU exhaustion via Accept-Language ranges matched as regular expressions. _language_match interpolates each Accept-Language range into the pattern `/^$range\-/i` without escaping it, so regular exp…

  • High 7.5

    WordPress WP Rocket plugin < 3.23.5 - Denial of Service Attack vulnerability

    Executable Regular Expression Error vulnerability in WP Media WP Rocket wp-rocket allows Code Injection.This issue affects WP Rocket: from n/a before 3.23.5.

  • Critical 9.2

    PEAR is Vulnerable to PHP Code Execution via preg_replace /e in Bug Update Emails

    PEAR is a framework and distribution system for reusable PHP components. Prior to version 1.33.0, use of preg_replace() with the /e modifier in bug update email handling can enable PHP code execution if attacker-controlled content reaches the evaluated replac…

  • High 7.5

    TF2 Item Format Regular Expression Denial of Service vulnerability

    TF2 Item Format helps users format TF2 items to the community standards. Versions of `tf2-item-format` since at least `4.2.6` and prior to `5.9.14` are vulnerable to a Regular Expression Denial of Service (ReDoS) attack when parsing crafted user input. This v…