Cloudanix VulnDB

CVE-2017-12837

High · 7.5

CVSS

7.5

EPSS

6.2%

Published

Sep 19, 2017

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A flaw in how certain text-matching patterns are processed can let an attacker crash the affected software, interrupting services until fixed.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Heap-based buffer overflow in S_regatom during regex compilation that performs an out-of-bounds write when a pattern contains a \N{} escape combined with the case-insensitive modifier.

Why it matters to the business

Denial-of-service crashes in any service or application that compiles untrusted regular expressions, with potential availability impact across 98 downstream dependents including packaged TensorFlow deployments.

How an attack unfolds

An attacker supplies a malicious regular expression containing a \N{} construct and the /i modifier to a Perl-based component; during compilation the S_regatom function writes beyond the allocated heap buffer, triggering a crash or memory corruption.

How to fix it

Upgrade Perl to 5.24.3 or 5.26.1 (or later) and update tensorflow (Bitnami) to version 2.1.4 or newer; rebuild and redeploy any affected containers or packages that embed the vulnerable Perl runtime.

How to confirm the fix worked

Confirm Perl version is at or above the fixed releases, run regression tests that exercise \N{} patterns under /i, and verify tensorflow (Bitnami) reports version 2.1.4 or later after upgrade.

Typical attack path

  1. Identify an entry point that accepts and compiles regular expressions (e.g., log filters, input validation, or search features).
  2. Craft a payload consisting of a \N{} escape sequence paired with the case-insensitive flag.
  3. Deliver the payload over the network or via local input channels.
  4. Trigger regex compilation to induce the heap write and resulting denial of service.

How to detect it

Review application and system logs for crashes or segmentation faults occurring immediately after regex compilation events; search process memory dumps or core files for patterns containing \N{} sequences near the time of failure.

What your security team should do

  • Immediately inventory all systems using Perl < 5.24.3 / 5.26.1 or tensorflow (Bitnami) < 2.1.4.
  • Prioritize patching tensorflow (Bitnami) deployments to 2.1.4 within the next maintenance window.
  • Disable or sandbox any feature that compiles untrusted regular expressions until patches are applied.
  • Add the affected Perl versions to vulnerability scanning policies and re-scan after remediation.

The record

Heap-based buffer overflow in the S_regatom 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 cause a denial of service (out-of-bounds write) via a regular expression with a '\N{}' escape and the case-insensitive modifier.

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