CVE-2013-5823: Xmlsec Apache XML Security For Java Vulnerability

MODERATE
Advisory Identifier: GHSA-8gwc-x7mg-7p7p
Published
Advisory Summary

CVE-2013-5823 is a MODERATE apache xml security for java vulnerability (General Security Weakness) affecting Xmlsec libraries in the Maven ecosystem. The issue involves apache xml security for java vulnerable to infinite loop. Remediation is available by upgrading affected packages to version 1.4.8, 1.5.3.

CVE-2013-5823 at a Glance

CVE Identifier CVE-2013-5823
GHSA Identifier GHSA-8gwc-x7mg-7p7p
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Xmlsec
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2013-5823

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.3
<dependency>
    <groupId>org.apache.santuario</groupId>
    <artifactId>xmlsec</artifactId>
    <version>1.5.3</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-5823, 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 General Security Weakness. 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

Affected versions of xmlsec are subject to a denial of service vulnerability. Should a user check the signature of a message larger than 512 MB, the method `expandSize(int newPos)` of class `org.apache.xml.security.utils.UnsyncByteArrayOutputStream` goes in an endless loop. A remote attacker could use this flaw to supply crafted XML that would lead to a denial of service.

CVE-2013-5823 Affected Xmlsec Versions

2 component(s)
Fixed Versions:
1.4.81.5.3
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.3
1.5.3

References

Frequently Asked Questions

What is CVE-2013-5823?
CVE-2013-5823 is a security vulnerability in Xmlsec involving Apache XML Security For Java vulnerable to Infinite Loop under General Security Weakness.
Which Xmlsec versions are affected?
Affected versions include releases prior to 1.4.8, 1.5.3 across affected packages: org.apache.santuario:xmlsec.
What version fixes CVE-2013-5823?
Upgrading to 1.4.8, 1.5.3 (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.3. Upgrade your dependency to 1.4.8, 1.5.3 or later.
What CWE is associated with CVE-2013-5823?
CVE-2013-5823 is classified under General Security Weakness.
How can I check Maven dependencies for CVE-2013-5823?
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-8gwc-x7mg-7p7p",
  "modified" : "2024-03-05T00:33:21Z",
  "published" : "2022-05-14T00:02:32Z",
  "aliases" : [ "CVE-2013-5823" ],
  "summary" : "Apache XML Security For Java vulnerable to Infinite Loop",
  "details" : "Affected versions of xmlsec are subject to a denial of service vulnerability. Should a user check the signature of a message larger than 512 MB, the method `expandSize(int newPos)` of class `org.apache.xml.security.utils.UnsyncByteArrayOutputStream` goes in an endless loop. A remote attacker could use this flaw to supply crafted XML that would lead to a denial of service.",
  "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.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-5823"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/santuario-java/commit/55a48497dfbf3fe63a81e67c13160b3f41ebb1f3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/santuario-java/commit/cea3c91106fb8be35e2f1bb3f1fe0cfddd0ec710"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/santuario-java/commit/f9a61f2df9473237aa71308c28113540b4063d33"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2014:0414"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2013-5823"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/SANTUARIO-334"
  }, {
    "type" : "WEB",
    "url" : "https://lists.opensuse.org/opensuse-updates/2013-11/msg00023.html"
  }, {
    "type" : "WEB",
    "url" : "https://marc.info/?l=bugtraq&m=138674031212883&w=2"
  }, {
    "type" : "WEB",
    "url" : "https://marc.info/?l=bugtraq&m=138674073720143&w=2"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/glsa-201406-32.xml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-08T14:57:18Z",
    "nvd_published_at" : "2013-10-16T17:55:00Z"
  }
}