CVE-2017-12883
Critical · 9.1CVSS
9.1
EPSS
5.9%
Published
Sep 19, 2017
CISA due date
—
Cloudanix analysis
A flaw in how certain software handles specially formatted text patterns can let attackers crash the program or steal information if they send the right input, so updating to fixed versions prevents this risk.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Buffer overflow in Perl regex compilation (S_grok_bslash_N in regcomp.c) triggered by invalid \N{U+...} escape sequences, enabling memory corruption that can leak sensitive data or crash the process.
Why it matters to the business
Applications relying on Perl regular expressions, including those with 98 downstream dependents such as certain TensorFlow deployments, face risk of service disruption or information exposure; the vulnerability has been public for over nine years with stable low exploitation probability.
How an attack unfolds
An attacker supplies a specially crafted regular expression containing an invalid Unicode escape sequence to any component that compiles it via the vulnerable Perl regex engine, causing the buffer overflow during parsing and resulting in either a crash or memory disclosure.
How to fix it
Upgrade affected Perl installations to 5.24.3 or 5.26.1 (or later) and update tensorflow (Bitnami) to version 2.1.4 or newer; apply vendor patches immediately where available and validate regex handling in dependent components.
How to confirm the fix worked
Verify Perl version is at least 5.24.3 or 5.26.1; confirm tensorflow (Bitnami) package reports version 2.1.4 or later; test with known-bad regex patterns to ensure no crash or unexpected behavior occurs.
Typical attack path
- Identify an entry point that accepts or processes regular expressions (e.g., user input, configuration, or library call)
- Craft a malicious regex containing an invalid \N{U+...} escape sequence
- Submit the regex to the vulnerable Perl regex compiler
- Observe application crash for denial of service or inspect memory for sensitive data leakage
How to detect it
Review application and system logs for unexpected crashes or segmentation faults during regex processing; inspect any available memory dumps or core files for signs of buffer overflow; correlate with network or application logs showing unusual regex patterns submitted around crash times.
What your security team should do
- Prioritize upgrade of tensorflow (Bitnami) to 2.1.4+ and underlying Perl packages across all environments
- Scan codebases and configurations for use of complex or user-supplied regular expressions
- Implement input validation or sandboxing around regex compilation where upgrades are delayed
- Monitor EPSS and exploit maturity indicators for any future increase in activity
The record
Buffer overflow in the S_grok_bslash_N function in regcomp.c in Perl 5 before 5.24.3-RC1 and 5.26.x before 5.26.1-RC1 allows remote attackers to disclose sensitive information or cause a denial of service (application crash) via a crafted regular expression with an invalid '\N{U+...}' escape.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.11 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.12 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.13 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.14 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.15 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.16 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.17 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.18 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.19 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.20 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.21 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.22 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.3 | perl | 0 | 5.22.3-r0 |
| Alpine:v3.4 | perl | 0 | 5.22.3-r0 |
| Alpine:v3.5 | perl | 0 | 5.24.3-r0 |
| Alpine:v3.6 | perl | 0 | 5.24.3-r0 |
| Alpine:v3.7 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.8 | perl | 0 | 5.26.1-r0 |
| Alpine:v3.9 | perl | 0 | 5.26.1-r0 |
| Debian:11 | perl | 0 | 5.26.0-8 |
| Debian:12 | perl | 0 | 5.26.0-8 |
| Debian:13 | perl | 0 | 5.26.0-8 |
| Debian:14 | perl | 0 | 5.26.0-8 |
| Debian:8 | perl | 0 | 5.20.2-3+deb8u9 |
| Debian:9 | perl | 0 | 5.24.1-3+deb9u2 |
| Mageia:5 | perl | 0 | 5.20.1-8.7.mga5 |
| Mageia:5 | perl-File-Path | 0 | 2.90.0-4.1.mga5 |
| Mageia:5 | perl-MIME-Charset | 0 | 1.11.1-4.1.mga5 |
| Mageia:5 | perl-MIME-EncWords | 0 | 1.14.2-4.1.mga5 |
| Mageia:5 | perl-Module-Build | 0 | 0.421.0-5.1.mga5 |
| Mageia:5 | perl-Module-Load-Conditional | 0 | 0.680.0-1.mga5 |
| Mageia:5 | perl-Net-DNS | 0 | 1.90.0-0.mga5 |
| Mageia:5 | perl-Sys-Syslog | 0 | 0.330.0-7.1.mga5 |
| Mageia:5 | perl-Unicode-LineBreak | 0 | 2014.60.0-5.1.mga5 |
| Mageia:5 | perl-libintl-perl | 0 | 1.230.0-6.1.mga5 |
| Mageia:6 | perl | 0 | 5.22.3-3.1.mga6 |
| SUSE:Linux Enterprise Desktop 12 SP2 | perl | 0 | 5.18.2-12.3.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | perl | 0 | 5.18.2-12.3.1 |
| SUSE:Linux Enterprise Server 12 SP2 | perl | 0 | 5.18.2-12.3.1 |
| SUSE:Linux Enterprise Server 12 SP3 | perl | 0 | 5.18.2-12.3.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | perl | 0 | 5.18.2-12.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | perl | 0 | 5.18.2-12.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | perl | 0 | 5.18.2-12.3.1 |
| Ubuntu:14.04:LTS | perl | 0 | 5.18.2-2ubuntu1.3 |
| Ubuntu:16.04:LTS | perl | 0 | 5.22.1-9ubuntu0.2 |
| openSUSE:Tumbleweed | perl | 0 | 5.34.0-1.1 |
Related vulnerabilities
- CVE-2017-12837 Heap-based buffer overflow in the S_regatom function in regcomp.c in Perl 5 before… Also affects perl
- CVE-2024-56406 A heap buffer overflow vulnerability was discovered in Perl. Also affects perl
- CVE-2016-1238 (1) cpan/Archive-Tar/bin/ptar, (2) cpan/Archive-Tar/bin/ptardiff, (3)… Also affects perl
- CVE-2016-9840 inftrees.c in zlib 1.2.8 might allow context-dependent attackers to have unspecified… Also affects perl
- CVE-2025-40909 Perl threads have a working directory race condition where file operations may target… Also affects perl
- CVE-2020-16156 CPAN 2.28 allows Signature Verification Bypass. Also affects perl
- CVE-2017-6512 Race condition in the rmtree and remove_tree functions in the File-Path module before… Also affects perl
- CVE-2016-6185 The XSLoader::load method in XSLoader in Perl does not properly locate .so files when… Also affects perl