Heap-based buffer overflow in the Perl_repeatcpy function in util.c in Perl 5.12.x before…
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- — Not recorded in CVSS 2.0
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- Partial · Partial · Partial
- Fix status
- Partial Red Hat: 5 fixed, 1 without a fix
Attack profile from CVSS 2.0 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-119 and the CVSS impact.
Summary
Heap-based buffer overflow in the Perl_repeatcpy function in util.c in Perl 5.12.x before 5.12.5, 5.14.x before 5.14.3, and 5.15.x before 15.15.5 allows context-dependent attackers to cause a denial of service (memory consumption and crash) or possibly execute arbitrary code via the 'x' string repeat operator.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
CPE configurations NVD · 23
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:perl:perl:5.12.0:*:*:*:*:*:*:* | 5.12.0 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.0:rc0:*:*:*:*:*:* | 5.12.0 rc0 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.0:rc1:*:*:*:*:*:* | 5.12.0 rc1 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.0:rc2:*:*:*:*:*:* | 5.12.0 rc2 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.0:rc3:*:*:*:*:*:* | 5.12.0 rc3 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.0:rc4:*:*:*:*:*:* | 5.12.0 rc4 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.0:rc5:*:*:*:*:*:* | 5.12.0 rc5 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.1:*:*:*:*:*:*:* | 5.12.1 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.1:rc1:*:*:*:*:*:* | 5.12.1 rc1 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.1:rc2:*:*:*:*:*:* | 5.12.1 rc2 | Vulnerable | Perl |
- cpe:2.3:a:perl:perl:5.12.0:*:*:*:*:*:*:* Versions 5.12.0 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.0:rc0:*:*:*:*:*:* Versions 5.12.0 rc0 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.0:rc1:*:*:*:*:*:* Versions 5.12.0 rc1 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.0:rc2:*:*:*:*:*:* Versions 5.12.0 rc2 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.0:rc3:*:*:*:*:*:* Versions 5.12.0 rc3 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.0:rc4:*:*:*:*:*:* Versions 5.12.0 rc4 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.0:rc5:*:*:*:*:*:* Versions 5.12.0 rc5 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.1:*:*:*:*:*:*:* Versions 5.12.1 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.1:rc1:*:*:*:*:*:* Versions 5.12.1 rc1 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.1:rc2:*:*:*:*:*:* Versions 5.12.1 rc2 Vulnerable ·Perl
Show 13 more CPE
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:perl:perl:5.12.2:*:*:*:*:*:*:* | 5.12.2 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.2:rc1:*:*:*:*:*:* | 5.12.2 rc1 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.3:*:*:*:*:*:*:* | 5.12.3 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.3:rc1:*:*:*:*:*:* | 5.12.3 rc1 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.3:rc2:*:*:*:*:*:* | 5.12.3 rc2 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.3:rc3:*:*:*:*:*:* | 5.12.3 rc3 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.12.4:*:*:*:*:*:*:* | 5.12.4 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.14.0:*:*:*:*:*:*:* | 5.14.0 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.14.0:rc1:*:*:*:*:*:* | 5.14.0 rc1 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.14.0:rc2:*:*:*:*:*:* | 5.14.0 rc2 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.14.0:rc3:*:*:*:*:*:* | 5.14.0 rc3 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.14.1:*:*:*:*:*:*:* | 5.14.1 | Vulnerable | Perl |
| cpe:2.3:a:perl:perl:5.14.2:*:*:*:*:*:*:* | 5.14.2 | Vulnerable | Perl |
- cpe:2.3:a:perl:perl:5.12.2:*:*:*:*:*:*:* Versions 5.12.2 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.2:rc1:*:*:*:*:*:* Versions 5.12.2 rc1 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.3:*:*:*:*:*:*:* Versions 5.12.3 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.3:rc1:*:*:*:*:*:* Versions 5.12.3 rc1 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.3:rc2:*:*:*:*:*:* Versions 5.12.3 rc2 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.3:rc3:*:*:*:*:*:* Versions 5.12.3 rc3 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.12.4:*:*:*:*:*:*:* Versions 5.12.4 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.14.0:*:*:*:*:*:*:* Versions 5.14.0 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.14.0:rc1:*:*:*:*:*:* Versions 5.14.0 rc1 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.14.0:rc2:*:*:*:*:*:* Versions 5.14.0 rc2 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.14.0:rc3:*:*:*:*:*:* Versions 5.14.0 rc3 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.14.1:*:*:*:*:*:*:* Versions 5.14.1 Vulnerable ·Perl
- cpe:2.3:a:perl:perl:5.14.2:*:*:*:*:*:*:* Versions 5.14.2 Vulnerable ·Perl
Remediation
Red Hat 1 advisory
- RHSA-2013:0685 Released 2013-03-26 · Red Hat rating Moderateperl security update
- Red Hat Enterprise Linux (v. 5 server) perl-4:5.8.8-40.el5_9, perl-4:5.8.8-40.el5_9.i386, perl-4:5.8.8-40.el5_9.ia64 +5
- Red Hat Enterprise Linux Desktop (v. 6) perl-4:5.10.1-130.el6_4, perl-Archive-Extract-1:0.38-130.el6_4, perl-Archive-Tar-1.58-130.el6_4 +43
- Red Hat Enterprise Linux HPC Node (v. 6) perl-4:5.10.1-130.el6_4, perl-Archive-Extract-1:0.38-130.el6_4, perl-Archive-Tar-1.58-130.el6_4 +43
- Red Hat Enterprise Linux Server (v. 6) perl-4:5.10.1-130.el6_4, perl-Archive-Extract-1:0.38-130.el6_4, perl-Archive-Tar-1.58-130.el6_4 +45
- Red Hat Enterprise Linux Workstation (v. 6) perl-4:5.10.1-130.el6_4, perl-Archive-Extract-1:0.38-130.el6_4, perl-Archive-Tar-1.58-130.el6_4 +43
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 4 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux (v. 5 server) | Fixed | RHSA-2013:0685 |
| Red Hat Enterprise Linux Desktop (v. 6) | Fixed | RHSA-2013:0685 |
| Red Hat Enterprise Linux HPC Node (v. 6) | Fixed | RHSA-2013:0685 |
| Red Hat Enterprise Linux Server (v. 6) | Fixed | RHSA-2013:0685 |
| Red Hat Enterprise Linux Workstation (v. 6) | Fixed | RHSA-2013:0685 |
Timeline
- 2026-10-02 Threatist record created from CVE-2012-5195
- 2026-10-03 Alias added: GHSA-6768-qw7m-q528
References
Other 8
- http://www.oracle.com/technetwork/topics/security/ovmbulletinjul2016-3090546.html
- [perl.perl5.porters] 20121010 maint-5.12, maint-5.14, and CVE-2012-5195
- http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10673
- https://wiki.mageia.org/en/Support/Advisories/MGASA-2012-0352
- [oss-security] 20121026 Medium severity flaw with Perl 5
- [oss-security] 20121027 Re: Medium severity flaw with Perl 5
- http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705
- http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10735
More Perl vulnerabilities
- TI-2022-24100 In Perl 5.34.0, function S_find_uninit_var in sv.c has a stack-based crash that can lead… CVSS 3.1CRITICAL 9.8
- TI-2012-05140 The _compile function in Maketext.pm in the Locale::Maketext implementation in Perl… CVSS 2.0HIGH 7.5
- TI-2018-12932 Perl before 5.26.3 and 5.28.0 before 5.28.1 has a buffer overflow via a crafted regular… CVSS 3.0CRITICAL 9.8
- TI-2018-12931 Perl before 5.26.3 and 5.28.x before 5.28.1 has a buffer overflow via a crafted regular… CVSS 3.0CRITICAL 9.8
- TI-2018-05049 Heap-based buffer overflow in the pack function in Perl before 5.26.2 allows… CVSS 3.0CRITICAL 9.8
- TI-2017-09493 Stack-based buffer overflow in the CPerlHost::Add method in win32/perlhost.h in Perl… CVSS 3.0CRITICAL 9.8
Sources
- CVE-2012-5195 · CVE Program
- CVE-2012-5195 · NVD
- FIRST EPSS
- GHSA-6768-qw7m-q528 · GitHub Advisory Database · CC BY 4.0
- CVE-2012-5195 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences