Description
ExtUtils::Typemaps::STL::String versions before 1.06 for Perl T_STD_STRING typemap may read the SV length before stringifying the argument.

The typemap uses

$var = std::string( SvPV_nolen($arg), SvCUR($arg) )

However, evaluation order for C++ arguments is not specified, and some compilers may produce code that evalutes SvCUR($arg) first.

When $arg is not a string (for example, an interger, number or a reference) then SvCUR will return an invalid value, and the program may abort or segfault.
Published: 2026-10-10
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service (crash)
Action: Apply Patch
AI Analysis

Impact

ExtUtils::Typemaps::STL::String before version 1.06 contains a typemap that constructs a C++ std::string from a Perl scalar by first calling SvPV_nolen to obtain the string data and SvCUR to obtain its length. Because the order of evaluation for C++ function arguments is unspecified, certain compilers may evaluate SvCUR before SvPV_nolen. If the provided scalar is not a string—such as an integer, number, or reference—SvCUR returns an undefined value, and the constructed std::string attempts to copy from an invalid memory range, causing the program to abort or segfault. This unsafe memory read is identified as CWE‑125 and results in a denial of service via application crash.

Affected Systems

Any installation that uses ExtUtils::Typemaps::STL::String versions earlier than 1.06 for the Perl T_STD_STRING typemap is affected. The vulnerability also impacts any Perl module that compiles against ExtUtils::Typemaps::Default before version 1.06, because the library includes the flawed typemap implementation. Upgrading to ExtUtils::Typemaps::Default 1.06 or later replaces the incorrect logic and mitigates the issue. Modules that link against the older library must be rebuilt after applying the patch.

Risk and Exploitability

The EPSS score is < 1% and the CVSS score is 9.1; the vulnerability is not listed in the CISA KEV catalog, indicating no widespread exploitation has been detected. Based on the description, it is inferred that an attacker would need to supply a non‑string argument to a module that uses the vulnerable typemap; this could be possible if the attacker controls input data passed to such modules. If such an attack vector exists, the exploit would likely cause a crash rather than remote code execution or data exfiltration. The resulting denial of service could be used to disrupt services or as a step in a larger attack chain, but the current risk remains moderate due to the lack of observable exploitation and the need for specific input conditions.

Generated by OpenCVE AI on October 17, 2026 at 08:15 UTC.

Remediation

Vendor Solution

Upgrade to ExtUtils::Typemaps::Default version 1.06 or later. Rebuild any modules that use ExtUtils::Typemaps::Default as part of their build process.


Vendor Workaround

For deployments that cannot be upgraded, ensure that arguments passed to modules that use ExtUtils::Typemaps::Default are strngified.


OpenCVE Recommended Actions

  • Upgrade ExtUtils::Typemaps::Default to version 1.06 or later.
  • Rebuild any Perl modules that depend on ExtUtils::Typemaps::Default so they link against the fixed library.
  • If an upgrade is not immediately possible, modify the affected module code to explicitly stringify any argument before passing it to the typemap, ensuring only proper string values reach the C++ logic.

Generated by OpenCVE AI on October 17, 2026 at 08:15 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 16 Oct 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H'}


Sun, 11 Oct 2026 12:45:00 +0000

Type Values Removed Values Added
First Time appeared Perl
Perl extutils::typemaps::stl::string
Vendors & Products Perl
Perl extutils::typemaps::stl::string

Sat, 10 Oct 2026 13:00:00 +0000

Type Values Removed Values Added
Description ExtUtils::Typemaps::STL::String versions before 1.06 for Perl T_STD_STRING typemap may read the SV length before stringifying the argument. The typemap uses $var = std::string( SvPV_nolen($arg), SvCUR($arg) ) However, evaluation order for C++ arguments is not specified, and some compilers may produce code that evalutes SvCUR($arg) first. When $arg is not a string (for example, an interger, number or a reference) then SvCUR will return an invalid value, and the program may abort or segfault.
Title ExtUtils::Typemaps::STL::String versions before 1.06 for Perl T_STD_STRING typemap may read the SV length before stringifying the argument
Weaknesses CWE-125
References

Subscriptions

Perl Extutils::typemaps::stl::string
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-10-16T15:39:45.111Z

Reserved: 2026-10-07T21:01:49.472Z

Link: CVE-2026-107373

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-10-10T13:17:31.253

Modified: 2026-10-16T16:16:57.310

Link: CVE-2026-107373

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-17T08:30:05Z

Weaknesses