CVE-2017-0904: Private address check Private_address_check Vulnerable To Bypass Of Vulnerability
MODERATECVE-2017-0904 is a MODERATE private_address_check vulnerable to bypass of vulnerability (CWE-242: Use of Inherently Dangerous Function) affecting Private address check libraries in the RubyGems ecosystem. The issue involves private_address_check vulnerable to bypass of resolv.getaddresses method. Remediation is available by upgrading affected packages to version 0.4.0.
CVE-2017-0904 at a Glance
How to Fix CVE-2017-0904
To remediate this vulnerability, upgrade all affected Private address check 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 private_address_check to 0.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for private_address_check
How to Check if You Are Affected
To determine whether your application is affected by CVE-2017-0904, inspect your project dependencies for Private address check:
inspect dependencies for private_address_check
Analyze the terminal output to locate any version of Private address check in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.0), 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-242: Use of Inherently Dangerous Function, where the product calls a function that can never be guaranteed to work safely. In Private address check, 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-0904 Affected Private address check Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
private_address_check
|
RubyGems |
< 0.4.0
|
0.4.0
|
References
Frequently Asked Questions
What is CVE-2017-0904?
Which Private address check versions are affected?
What version fixes CVE-2017-0904?
Is private_address_check affected?
What CWE is associated with CVE-2017-0904?
How can I check RubyGems dependencies for CVE-2017-0904?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hxhj-hp9m-qwc4",
"modified" : "2023-01-23T17:38:44Z",
"published" : "2017-11-29T23:21:05Z",
"aliases" : [ "CVE-2017-0904" ],
"summary" : "private_address_check vulnerable to bypass of Resolv.getaddresses method",
"details" : "The private_address_check ruby gem before 0.4.0 is vulnerable to a bypass due to use of Ruby's `Resolv.getaddresses` method, which is OS-dependent and should not be relied upon for security measures, such as when used to blacklist private network addresses to prevent server-side request forgery.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "private_address_check"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-0904"
}, {
"type" : "WEB",
"url" : "https://github.com/jtdowney/private_address_check/issues/1"
}, {
"type" : "WEB",
"url" : "https://github.com/jtdowney/private_address_check/commit/58a0d7fe31de339c0117160567a5b33ad82b46af"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/287245"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/287835"
}, {
"type" : "WEB",
"url" : "https://edoverflow.com/2017/ruby-resolv-bug"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-242" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:41:23Z",
"nvd_published_at" : null
}
}