CVE-2013-0269: Json JSON Gem Has Improper Input Vulnerability

HIGH
Advisory Identifier: GHSA-x457-cw4h-hq5f
CWE-20
Published
Advisory Summary

CVE-2013-0269 is a HIGH json gem has improper input vulnerability (CWE-20: Improper Input Validation) affecting Json libraries in the RubyGems ecosystem. The issue involves json gem has improper input validation vulnerability. Remediation is available by upgrading affected packages to version 1.5.5, 1.6.8, 1.7.7.

CVE-2013-0269 at a Glance

CVE Identifier CVE-2013-0269
GHSA Identifier GHSA-x457-cw4h-hq5f
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-20: Improper Input Validation
Affected Product Json
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2013-0269

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

json fixed: 1.5.5
Upgrade json to 1.5.5
json fixed: 1.6.8
Upgrade json to 1.6.8
json fixed: 1.7.7
Upgrade json to 1.7.7
Verify Direct and Transitive Dependencies

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

inspect dependencies for json

How to Check if You Are Affected

To determine whether your application is affected by CVE-2013-0269, inspect your project dependencies for Json:

inspect dependencies for json

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Json, 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

The JSON gem before 1.5.5, 1.6.x before 1.6.8, and 1.7.x before 1.7.7 for Ruby allows remote attackers to cause a denial of service (resource consumption) or bypass the mass assignment protection mechanism via a crafted JSON document that triggers the creation of arbitrary Ruby symbols or certain internal objects, as demonstrated by conducting a SQL injection attack against Ruby on Rails, aka "Unsafe Object Creation Vulnerability."

CVE-2013-0269 Affected Json Versions

3 component(s)
Fixed Versions:
1.5.51.6.81.7.7
Product / Package Ecosystem Affected Versions Fixed Version
json
RubyGems
< 1.5.5
1.5.5
json
RubyGems
≥ 1.6.0
< 1.6.8
1.6.8
json
RubyGems
≥ 1.7.0
< 1.7.7
1.7.7

References

NVD — CVE-2013-0269 NVD
https://nvd.nist.gov/vuln/detail/CVE-2013-0269
exchange.xforce.ibmcloud.com/vulnerabilities/820... WEB
https://exchange.xforce.ibmcloud.com/vulnerabilities/82010
Json Source Repository REPOSITORY
https://github.com/flori/json
Json Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/json/CVE-2013-0269.yml
Json Security Information SECURITY
https://groups.google.com/group/rubyonrails-security/msg/d8e0db6e08c81428?dmode=source&output=gplain
Json Security Information SECURITY
https://web.archive.org/web/20130228082541/http://www.securityfocus.com/bid/57899
Json Security Information SECURITY
https://web.archive.org/web/20160331131233/http://spreecommerce.com/blog/multiple-security-vulnerabilities-fixed
Json Security Information SECURITY
https://web.archive.org/web/20160808163226/https://puppet.com/security/cve/cve-2013-0269
Json Security Information SECURITY
http://lists.apple.com/archives/security-announce/2013/Oct/msg00006.html
Json Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-04/msg00001.html
Json 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
rhn.redhat.com/errata/rhsa-2013-06... WEB
http://rhn.redhat.com/errata/RHSA-2013-0686.html
rhn.redhat.com/errata/rhsa-2013-07... WEB
http://rhn.redhat.com/errata/RHSA-2013-0701.html
rhn.redhat.com/errata/rhsa-2013-10... WEB
http://rhn.redhat.com/errata/RHSA-2013-1028.html
rhn.redhat.com/errata/rhsa-2013-11... WEB
http://rhn.redhat.com/errata/RHSA-2013-1147.html
weblog.rubyonrails.org/2013/2/11/sec-ann-r... WEB
http://weblog.rubyonrails.org/2013/2/11/SEC-ANN-Rails-3-2-12-3-1-11-and-2-3-17-have-been-released
Json Security Information SECURITY
http://www.openwall.com/lists/oss-security/2013/02/11/7
Json Security Information SECURITY
http://www.openwall.com/lists/oss-security/2013/02/11/8
Json Security Information SECURITY
http://www.slackware.com/security/viewer.php?l=slackware-security&y=2013&m=slackware-security.426862
www.ubuntu.com/usn/usn-1733-1 WEB
http://www.ubuntu.com/usn/USN-1733-1
www.zweitag.de/en/blog/ruby-on-rai... WEB
http://www.zweitag.de/en/blog/ruby-on-rails-vulnerable-to-mass-assignment-and-sql-injection

Frequently Asked Questions

What is CVE-2013-0269?
CVE-2013-0269 is a security vulnerability in Json involving JSON gem has Improper Input Validation vulnerability under CWE-20: Improper Input Validation.
Which Json versions are affected?
Affected versions include releases prior to 1.5.5, 1.6.8, 1.7.7 across affected packages: json.
What version fixes CVE-2013-0269?
Upgrading to 1.5.5, 1.6.8, 1.7.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is json affected?
Yes, json is affected in releases prior to 1.5.5, 1.6.8, 1.7.7. Upgrade your dependency to 1.5.5, 1.6.8, 1.7.7 or later.
What CWE is associated with CVE-2013-0269?
CVE-2013-0269 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check RubyGems dependencies for CVE-2013-0269?
Run the dependency tree command: 'inspect dependencies for json'. 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-x457-cw4h-hq5f",
  "modified" : "2023-06-01T19:55:21Z",
  "published" : "2017-10-24T18:33:37Z",
  "aliases" : [ "CVE-2013-0269" ],
  "summary" : "JSON gem has Improper Input Validation vulnerability",
  "details" : "The JSON gem before 1.5.5, 1.6.x before 1.6.8, and 1.7.x before 1.7.7 for Ruby allows remote attackers to cause a denial of service (resource consumption) or bypass the mass assignment protection mechanism via a crafted JSON document that triggers the creation of arbitrary Ruby symbols or certain internal objects, as demonstrated by conducting a SQL injection attack against Ruby on Rails, aka \"Unsafe Object Creation Vulnerability.\"",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "json"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "json"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.6.0"
      }, {
        "fixed" : "1.6.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "json"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.7.0"
      }, {
        "fixed" : "1.7.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-0269"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/82010"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/flori/json"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/json/CVE-2013-0269.yml"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/group/rubyonrails-security/msg/d8e0db6e08c81428?dmode=source&output=gplain"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20130228082541/http://www.securityfocus.com/bid/57899"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20160331131233/http://spreecommerce.com/blog/multiple-security-vulnerabilities-fixed"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20160808163226/https://puppet.com/security/cve/cve-2013-0269"
  }, {
    "type" : "WEB",
    "url" : "http://lists.apple.com/archives/security-announce/2013/Oct/msg00006.html"
  }, {
    "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://rhn.redhat.com/errata/RHSA-2013-0686.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-0701.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1028.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1147.html"
  }, {
    "type" : "WEB",
    "url" : "http://weblog.rubyonrails.org/2013/2/11/SEC-ANN-Rails-3-2-12-3-1-11-and-2-3-17-have-been-released"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/02/11/7"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/02/11/8"
  }, {
    "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-1733-1"
  }, {
    "type" : "WEB",
    "url" : "http://www.zweitag.de/en/blog/ruby-on-rails-vulnerable-to-mass-assignment-and-sql-injection"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T22:01:58Z",
    "nvd_published_at" : "2013-02-13T01:55:05Z"
  }
}