VYPR
Unrated severityNVD Advisory· Published Dec 7, 2018· Updated Aug 5, 2024

CVE-2018-18314

CVE-2018-18314

Description

Perl before 5.26.3 has a buffer overflow via a crafted regular expression that triggers invalid write operations.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

3

Patches

Vulnerability mechanics

Root cause

"A crafted regular expression triggers invalid write operations in Perl's regex engine, leading to a buffer overflow."

Attack vector

An attacker can trigger this vulnerability by providing a specially crafted regular expression to Perl's regex engine. This crafted input can cause the engine to perform invalid write operations, ultimately leading to a buffer overflow. The vulnerability is related to the handling of extended character classes within regular expressions [ref_id=1].

Affected code

The vulnerability lies within the regular expression parsing logic in Perl, particularly concerning the handling of extended character classes and syntax within them. The changes in the patch address specific error conditions related to `(?[...])` constructs and character class syntax, as shown in the diff provided [ref_id=1].

What the fix does

The patch modifies the Perl regex engine to correctly handle syntax errors within extended character classes, specifically those involving `(?[...])`. By adding checks for unexpected closing brackets and ensuring proper parsing of character class ranges and properties, the engine now avoids the invalid write operations that previously led to a buffer overflow [ref_id=1].

Generated on Jun 3, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

14

News mentions

0

No linked articles in our index yet.