CVE-2013-2172: Xmlsec Inefficient Algorithmic Complexity Vulnerability

MODERATE
Advisory Identifier: GHSA-r237-w2w6-jq3p
CWE-407
Published
Advisory Summary

CVE-2013-2172 is a MODERATE inefficient algorithmic complexity vulnerability (CWE-407: Inefficient Algorithmic Complexity) affecting Xmlsec libraries in the Maven ecosystem. The issue involves inefficient algorithmic complexity in apache santuario xml security. Remediation is available by upgrading affected packages to version 1.4.8, 1.5.5.

CVE-2013-2172 at a Glance

CVE Identifier CVE-2013-2172
GHSA Identifier GHSA-r237-w2w6-jq3p
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-407: Inefficient Algorithmic Complexity
Affected Product Xmlsec
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2013-2172

To remediate this vulnerability, upgrade all affected Xmlsec dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.santuario:xmlsec fixed: 1.4.8
<dependency>
    <groupId>org.apache.santuario</groupId>
    <artifactId>xmlsec</artifactId>
    <version>1.4.8</version>
</dependency>
org.apache.santuario:xmlsec fixed: 1.5.5
<dependency>
    <groupId>org.apache.santuario</groupId>
    <artifactId>xmlsec</artifactId>
    <version>1.5.5</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.santuario

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2013-2172, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.santuario

Analyze the terminal output to locate any version of Xmlsec in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.8), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.santuario command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-407: Inefficient Algorithmic Complexity, where an algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached. In Xmlsec, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

`jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java` in Apache Santuario XML Security for Java 1.4.x before 1.4.8 and 1.5.x before 1.5.5 allows context-dependent attackers to spoof an XML Signature by using the CanonicalizationMethod parameter to specify an arbitrary weak "canonicalization algorithm to apply to the SignedInfo part of the Signature."

CVE-2013-2172 Affected Xmlsec Versions

2 component(s)
Fixed Versions:
1.4.81.5.5
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.santuario:xmlsec
Maven
≥ 1.4.0
< 1.4.8
1.4.8
org.apache.santuario:xmlsec
Maven
≥ 1.5.0
< 1.5.5
1.5.5

References

NVD — CVE-2013-2172 NVD
https://nvd.nist.gov/vuln/detail/CVE-2013-2172
Security Fix Commit FIX COMMIT
https://github.com/apache/santuario-java/commit/25e0e11493b061749f778030036cb5c406b34590
Security Fix Commit FIX COMMIT
https://github.com/apache/santuario-java/commit/8e8f8bf92a43608d7d5f9e357fae19244454a61f
Xmlsec Source Repository REPOSITORY
https://github.com/apache/santuario-java
lists.apache.org/thread.html/680e693... WEB
https://lists.apache.org/thread.html/680e6938b6412e26d5446054fd31de2011d33af11786b989127d1cc3%40%3Ccommits.santuario.apache.org%3E
lists.apache.org/thread.html/680e693... WEB
https://lists.apache.org/thread.html/680e6938b6412e26d5446054fd31de2011d33af11786b989127d1cc3@%3Ccommits.santuario.apache.org%3E
lists.apache.org/thread.html/r1c07a5... WEB
https://lists.apache.org/thread.html/r1c07a561426ec5579073046ad7f4207cdcef452bb3100abaf908e0cd%40%3Ccommits.santuario.apache.org%3E
lists.apache.org/thread.html/r1c07a5... WEB
https://lists.apache.org/thread.html/r1c07a561426ec5579073046ad7f4207cdcef452bb3100abaf908e0cd@%3Ccommits.santuario.apache.org%3E
Xmlsec Security Information SECURITY
https://web.archive.org/web/20160317145515/http://www.securityfocus.com/archive/1/534161/100/0/threaded
Xmlsec Security Information SECURITY
https://web.archive.org/web/20200228060314/http://www.securityfocus.com/bid/60846
rhn.redhat.com/errata/rhsa-2013-12... WEB
http://rhn.redhat.com/errata/RHSA-2013-1207.html
rhn.redhat.com/errata/rhsa-2013-12... WEB
http://rhn.redhat.com/errata/RHSA-2013-1208.html
rhn.redhat.com/errata/rhsa-2013-12... WEB
http://rhn.redhat.com/errata/RHSA-2013-1209.html
rhn.redhat.com/errata/rhsa-2013-12... WEB
http://rhn.redhat.com/errata/RHSA-2013-1217.html
rhn.redhat.com/errata/rhsa-2013-12... WEB
http://rhn.redhat.com/errata/RHSA-2013-1218.html
rhn.redhat.com/errata/rhsa-2013-12... WEB
http://rhn.redhat.com/errata/RHSA-2013-1219.html
rhn.redhat.com/errata/rhsa-2013-12... WEB
http://rhn.redhat.com/errata/RHSA-2013-1220.html
rhn.redhat.com/errata/rhsa-2013-13... WEB
http://rhn.redhat.com/errata/RHSA-2013-1375.html
rhn.redhat.com/errata/rhsa-2013-14... WEB
http://rhn.redhat.com/errata/RHSA-2013-1437.html
rhn.redhat.com/errata/rhsa-2013-18... WEB
http://rhn.redhat.com/errata/RHSA-2013-1853.html
rhn.redhat.com/errata/rhsa-2014-02... WEB
http://rhn.redhat.com/errata/RHSA-2014-0212.html
santuario.apache.org/secadv.data/cve-201... WEB
http://santuario.apache.org/secadv.data/CVE-2013-2172.txt.asc
seclists.org/fulldisclosure/2014... WEB
http://seclists.org/fulldisclosure/2014/Dec/23
Xmlsec Security Information SECURITY
http://svn.apache.org/viewvc/santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java?r1=1353876&r2=1493772&pathrev=1493772&diff_format=h
Xmlsec Security Information SECURITY
http://www.debian.org/security/2014/dsa-3065
Xmlsec Security Information SECURITY
http://www.oracle.com/technetwork/topics/security/cpujul2014-1972956.html
www.ubuntu.com/usn/usn-2028-1 WEB
http://www.ubuntu.com/usn/USN-2028-1
Xmlsec Security Information SECURITY
http://www.vmware.com/security/advisories/VMSA-2014-0012.html

Frequently Asked Questions

What is CVE-2013-2172?
CVE-2013-2172 is a security vulnerability in Xmlsec involving Inefficient Algorithmic Complexity in Apache Santuario XML Security under CWE-407: Inefficient Algorithmic Complexity.
Which Xmlsec versions are affected?
Affected versions include releases prior to 1.4.8, 1.5.5 across affected packages: org.apache.santuario:xmlsec.
What version fixes CVE-2013-2172?
Upgrading to 1.4.8, 1.5.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xmlsec affected?
Yes, org.apache.santuario:xmlsec is affected in releases prior to 1.4.8, 1.5.5. Upgrade your dependency to 1.4.8, 1.5.5 or later.
What CWE is associated with CVE-2013-2172?
CVE-2013-2172 is classified under CWE-407: Inefficient Algorithmic Complexity (An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.).
How can I check Maven dependencies for CVE-2013-2172?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.santuario'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r237-w2w6-jq3p",
  "modified" : "2024-03-05T18:21:58Z",
  "published" : "2022-05-13T01:05:56Z",
  "aliases" : [ "CVE-2013-2172" ],
  "summary" : "Inefficient Algorithmic Complexity in Apache Santuario XML Security",
  "details" : "`jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java` in Apache Santuario XML Security for Java 1.4.x before 1.4.8 and 1.5.x before 1.5.5 allows context-dependent attackers to spoof an XML Signature by using the CanonicalizationMethod parameter to specify an arbitrary weak \"canonicalization algorithm to apply to the SignedInfo part of the Signature.\"",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.santuario:xmlsec"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.4.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.santuario:xmlsec"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0"
      }, {
        "fixed" : "1.5.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-2172"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/santuario-java/commit/25e0e11493b061749f778030036cb5c406b34590"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/santuario-java/commit/8e8f8bf92a43608d7d5f9e357fae19244454a61f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/santuario-java"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/680e6938b6412e26d5446054fd31de2011d33af11786b989127d1cc3%40%3Ccommits.santuario.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/680e6938b6412e26d5446054fd31de2011d33af11786b989127d1cc3@%3Ccommits.santuario.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r1c07a561426ec5579073046ad7f4207cdcef452bb3100abaf908e0cd%40%3Ccommits.santuario.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r1c07a561426ec5579073046ad7f4207cdcef452bb3100abaf908e0cd@%3Ccommits.santuario.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20160317145515/http://www.securityfocus.com/archive/1/534161/100/0/threaded"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200228060314/http://www.securityfocus.com/bid/60846"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1207.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1208.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1209.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1217.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1218.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1219.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1220.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1375.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1437.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1853.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-0212.html"
  }, {
    "type" : "WEB",
    "url" : "http://santuario.apache.org/secadv.data/CVE-2013-2172.txt.asc"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2014/Dec/23"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc/santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java?r1=1353876&r2=1493772&pathrev=1493772&diff_format=h"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2014/dsa-3065"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/topics/security/cpujul2014-1972956.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-2028-1"
  }, {
    "type" : "WEB",
    "url" : "http://www.vmware.com/security/advisories/VMSA-2014-0012.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-407" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-08T19:08:41Z",
    "nvd_published_at" : "2013-08-20T22:55:00Z"
  }
}