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- Range: <5.26.3
- osv-coords2 versionspkg:rpm/suse/perl&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015pkg:rpm/suse/perl&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015
< 5.26.1-7.6.1+ 1 more
- (no CPE)range: < 5.26.1-7.6.1
- (no CPE)range: < 5.26.1-7.6.1
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- access.redhat.com/errata/RHSA-2019:0001mitrevendor-advisoryx_refsource_REDHAT
- access.redhat.com/errata/RHSA-2019:0010mitrevendor-advisoryx_refsource_REDHAT
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RWQGEB543QN7SSBRKYJM6PSOC3RLYGSM/mitrevendor-advisoryx_refsource_FEDORA
- security.gentoo.org/glsa/201909-01mitrevendor-advisoryx_refsource_GENTOO
- usn.ubuntu.com/3834-1/mitrevendor-advisoryx_refsource_UBUNTU
- www.debian.org/security/2018/dsa-4347mitrevendor-advisoryx_refsource_DEBIAN
- www.securityfocus.com/bid/106145mitrevdb-entryx_refsource_BID
- www.securitytracker.com/id/1042181mitrevdb-entryx_refsource_SECTRACK
- bugzilla.redhat.com/show_bug.cgimitrex_refsource_CONFIRM
- github.com/Perl/perl5/commit/19a498a461d7c81ae3507c450953d1148efecf4fmitrex_refsource_CONFIRM
- metacpan.org/changes/release/SHAY/perl-5.26.3mitrex_refsource_CONFIRM
- rt.perl.org/Ticket/Display.htmlmitrex_refsource_CONFIRM
- security.netapp.com/advisory/ntap-20190221-0003/mitrex_refsource_CONFIRM
- www.oracle.com/security-alerts/cpujul2020.htmlmitrex_refsource_MISC
News mentions
0No linked articles in our index yet.