CVE-2013-1821: Jruby Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-hgg7-cghq-xhf4
CWE-400
Published
Advisory Summary

CVE-2013-1821 is a MODERATE denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Jruby libraries in the Maven ecosystem. The issue involves ruby vulnerable to denial of service. Remediation is available by upgrading affected packages to version 1.7.3.

CVE-2013-1821 at a Glance

CVE Identifier CVE-2013-1821
GHSA Identifier GHSA-hgg7-cghq-xhf4
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Jruby
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2013-1821

To remediate this vulnerability, upgrade all affected Jruby 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.jruby:jruby fixed: 1.7.3
<dependency>
    <groupId>org.jruby</groupId>
    <artifactId>jruby</artifactId>
    <version>1.7.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.jruby

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.jruby

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

Note: The mvn dependency:tree -Dincludes=org.jruby 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Jruby, 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

When reading text nodes from an XML document, the REXML parser can be coerced in to allocating extremely large string objects which can consume all of the memory on a machine, causing a denial of service. Jruby resolves this bug in version 1.7.3 as noted in https://www.jruby.org/2013/02/21/jruby-1-7-3.html

CVE-2013-1821 Affected Jruby Versions

1 component(s)
Fixed Versions:
1.7.3
Product / Package Ecosystem Affected Versions Fixed Version
org.jruby:jruby
Maven
< 1.7.3
1.7.3

References

NVD — CVE-2013-1821 NVD
https://nvd.nist.gov/vuln/detail/CVE-2013-1821
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=914716
Jruby Source Repository REPOSITORY
https://github.com/jruby/jruby
wiki.mageia.org/en/support/advisori... WEB
https://wiki.mageia.org/en/Support/Advisories/MGASA-2013-0092
Jruby Security Information SECURITY
https://www.jruby.org/2013/02/21/jruby-1-7-3.html
bugs.debian.org/cgi-bin/bugreport.c... WEB
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702525
Jruby Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-04/msg00001.html
Jruby Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-04/msg00015.html
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2013-04/msg00034.html
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2013-04/msg00036.html
rhn.redhat.com/errata/rhsa-2013-11... WEB
http://rhn.redhat.com/errata/RHSA-2013-1147.html
svn.ruby-lang.org/cgi-bin/viewvc.cgi WEB
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=39384
Jruby Security Information SECURITY
http://www.debian.org/security/2013/dsa-2738
Jruby Security Information SECURITY
http://www.debian.org/security/2013/dsa-2809
Jruby Security Information SECURITY
http://www.mandriva.com/security/advisories?name=MDVSA-2013:124
Jruby Security Information SECURITY
http://www.openwall.com/lists/oss-security/2013/03/06/5
www.ruby-lang.org/en/news/2013/02/22/... WEB
http://www.ruby-lang.org/en/news/2013/02/22/rexml-dos-2013-02-22
Jruby Security Information SECURITY
http://www.slackware.com/security/viewer.php?l=slackware-security&y=2013&m=slackware-security.426862
www.ubuntu.com/usn/usn-1780-1 WEB
http://www.ubuntu.com/usn/USN-1780-1

Frequently Asked Questions

What is CVE-2013-1821?
CVE-2013-1821 is a security vulnerability in Jruby involving Ruby vulnerable to denial of service under CWE-400: Uncontrolled Resource Consumption.
Which Jruby versions are affected?
Affected versions include releases prior to 1.7.3 across affected packages: org.jruby:jruby.
What version fixes CVE-2013-1821?
Upgrading to 1.7.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jruby affected?
Yes, org.jruby:jruby is affected in releases prior to 1.7.3. Upgrade your dependency to 1.7.3 or later.
What CWE is associated with CVE-2013-1821?
CVE-2013-1821 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Maven dependencies for CVE-2013-1821?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.jruby'. 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-hgg7-cghq-xhf4",
  "modified" : "2023-08-16T09:36:12Z",
  "published" : "2022-05-17T03:23:26Z",
  "aliases" : [ "CVE-2013-1821" ],
  "summary" : "Ruby vulnerable to denial of service",
  "details" : "When reading text nodes from an XML document, the REXML parser can be coerced in to allocating extremely large string objects which can consume all of the memory on a machine, causing a denial of service.\n\nJruby resolves this bug in version 1.7.3 as noted in https://www.jruby.org/2013/02/21/jruby-1-7-3.html",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jruby:jruby"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-1821"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=914716"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jruby/jruby"
  }, {
    "type" : "WEB",
    "url" : "https://wiki.mageia.org/en/Support/Advisories/MGASA-2013-0092"
  }, {
    "type" : "WEB",
    "url" : "https://www.jruby.org/2013/02/21/jruby-1-7-3.html"
  }, {
    "type" : "WEB",
    "url" : "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702525"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2013-04/msg00001.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2013-04/msg00015.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2013-04/msg00034.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2013-04/msg00036.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1147.html"
  }, {
    "type" : "WEB",
    "url" : "http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=39384"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2013/dsa-2738"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2013/dsa-2809"
  }, {
    "type" : "WEB",
    "url" : "http://www.mandriva.com/security/advisories?name=MDVSA-2013:124"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/03/06/5"
  }, {
    "type" : "WEB",
    "url" : "http://www.ruby-lang.org/en/news/2013/02/22/rexml-dos-2013-02-22"
  }, {
    "type" : "WEB",
    "url" : "http://www.slackware.com/security/viewer.php?l=slackware-security&y=2013&m=slackware-security.426862"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-1780-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-08T12:51:05Z",
    "nvd_published_at" : "2013-04-09T21:55:00Z"
  }
}