CVE-2017-16516: Yajl ruby Denial of Service Vulnerability
HIGHCVE-2017-16516 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-134: Use of Externally-Controlled Format String) affecting Yajl ruby libraries in the RubyGems ecosystem. The issue involves yajl-ruby gem denial of service vulnerability. Remediation is available by upgrading affected packages to version 1.3.1.
CVE-2017-16516 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2017-16516
To remediate this vulnerability, upgrade all affected Yajl ruby dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade yajl-ruby to 1.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for yajl-ruby
How to Check if You Are Affected
To determine whether your application is affected by CVE-2017-16516, inspect your project dependencies for Yajl ruby:
inspect dependencies for yajl-ruby
Analyze the terminal output to locate any version of Yajl ruby in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.1), 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-134: Use of Externally-Controlled Format String, where the product uses a function that accepts a format string as an argument, but the format string originates from an external source. In Yajl ruby, 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
CVE-2017-16516 Affected Yajl ruby Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
yajl-ruby
|
RubyGems |
< 1.3.1
|
1.3.1
|
References
Frequently Asked Questions
What is CVE-2017-16516?
Which Yajl ruby versions are affected?
What version fixes CVE-2017-16516?
Is yajl-ruby affected?
What is the CVSS score of CVE-2017-16516?
What CWE is associated with CVE-2017-16516?
How can I check RubyGems dependencies for CVE-2017-16516?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wwh7-4jw9-33x6",
"modified" : "2023-08-29T16:04:20Z",
"published" : "2017-11-28T22:44:42Z",
"aliases" : [ "CVE-2017-16516" ],
"summary" : "yajl-ruby gem Denial of Service vulnerability",
"details" : "In the yajl-ruby gem 1.3.0 for Ruby, when a crafted JSON file is supplied to `Yajl::Parser.new.parse`, the whole ruby process crashes with a SIGABRT in the `yajl_string_decode` function in `yajl_encode.c`. This results in the whole ruby process terminating and potentially a denial of service.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "yajl-ruby"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16516"
}, {
"type" : "WEB",
"url" : "https://github.com/brianmario/yajl-ruby/issues/176"
}, {
"type" : "WEB",
"url" : "https://github.com/brianmario/yajl-ruby/pull/178"
}, {
"type" : "WEB",
"url" : "https://github.com/github/advisory-database/pull/2158"
}, {
"type" : "WEB",
"url" : "https://github.com/brianmario/yajl-ruby/commit/a8ca8f476655adaa187eedc60bdc770fff3c51ce"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/brianmario/yajl-ruby"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/yajl-ruby/CVE-2017-16516.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2017/11/msg00010.html"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/07/msg00013.html"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/08/msg00003.html"
}, {
"type" : "WEB",
"url" : "https://rubygems.org/gems/yajl-ruby"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-134" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T22:01:25Z",
"nvd_published_at" : "2017-11-03T15:29:00Z"
}
}