CVE-2018-1000201: Ffi Ruby-ffi Has A DLL Loading Vulnerability
HIGHCVE-2018-1000201 is a HIGH (CVSS 7.8) ruby-ffi has a dll loading vulnerability (CWE-426: Untrusted Search Path) affecting Ffi libraries in the RubyGems ecosystem. The issue involves ruby-ffi has a dll loading issue. Remediation is available by upgrading affected packages to version 1.9.24.
CVE-2018-1000201 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2018-1000201
To remediate this vulnerability, upgrade all affected Ffi 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 ffi to 1.9.24
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for ffi
How to Check if You Are Affected
To determine whether your application is affected by CVE-2018-1000201, inspect your project dependencies for Ffi:
inspect dependencies for ffi
Analyze the terminal output to locate any version of Ffi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.24), 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-426: Untrusted Search Path, where the product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control. In Ffi, 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-2018-1000201 Affected Ffi Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ffi
|
RubyGems |
< 1.9.24
|
1.9.24
|
References
Frequently Asked Questions
What is CVE-2018-1000201?
Which Ffi versions are affected?
What version fixes CVE-2018-1000201?
Is ffi affected?
What is the CVSS score of CVE-2018-1000201?
What CWE is associated with CVE-2018-1000201?
How can I check RubyGems dependencies for CVE-2018-1000201?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2gw2-8q9w-cw8p",
"modified" : "2023-01-25T22:55:50Z",
"published" : "2018-08-31T14:55:43Z",
"aliases" : [ "CVE-2018-1000201" ],
"summary" : "Ruby-ffi has a DLL loading issue ",
"details" : "ruby-ffi version 1.9.23 and earlier has a DLL loading issue which can be hijacked on Windows OS, when a Symbol is used as DLL name instead of a String This vulnerability appears to have been fixed in v1.9.24 and later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "ffi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.24"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1000201"
}, {
"type" : "WEB",
"url" : "https://github.com/ffi/ffi/commit/09e0c6076466b4383da7fa4e13f714311109945a"
}, {
"type" : "WEB",
"url" : "https://github.com/ffi/ffi/commit/e0fe486df0e117ed67b0282b6ada04b7214ca05c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ffi/ffi"
}, {
"type" : "WEB",
"url" : "https://github.com/ffi/ffi/releases/tag/1.9.24"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/ffi/CVE-2018-1000201.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-426" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:52:04Z",
"nvd_published_at" : null
}
}