CVE-2017-1000168: Sodiumoxide Scalarmult() Vulnerable To Degenerate Public Vulnerability
MODERATECVE-2017-1000168 is a MODERATE (CVSS 6.5) scalarmult() vulnerable to degenerate public vulnerability (CWE-1240: Use of a Cryptographic Primitive with a Risky Implementation) affecting Sodiumoxide libraries in the crates.io ecosystem. The issue involves scalarmult() vulnerable to degenerate public keys. Remediation is available by upgrading affected packages to version 0.0.14.
CVE-2017-1000168 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).
How to Fix CVE-2017-1000168
To remediate this vulnerability, upgrade all affected Sodiumoxide 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 sodiumoxide to 0.0.14
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for sodiumoxide
How to Check if You Are Affected
To determine whether your application is affected by CVE-2017-1000168, inspect your project dependencies for Sodiumoxide:
inspect dependencies for sodiumoxide
Analyze the terminal output to locate any version of Sodiumoxide in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.14), 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-1240: Use of a Cryptographic Primitive with a Risky Implementation, where to fulfill the need for a cryptographic primitive, the product implements a cryptographic algorithm using a non-standard, unproven, or disallowed/non-compliant cryptographic implementation. In Sodiumoxide, 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-1000168 Affected Sodiumoxide Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sodiumoxide
|
crates.io |
< 0.0.14
|
0.0.14
|
References
Frequently Asked Questions
What is CVE-2017-1000168?
Which Sodiumoxide versions are affected?
What version fixes CVE-2017-1000168?
Is sodiumoxide affected?
What is the CVSS score of CVE-2017-1000168?
What CWE is associated with CVE-2017-1000168?
How can I check crates.io dependencies for CVE-2017-1000168?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2wc6-2rcj-8v76",
"modified" : "2023-06-13T20:56:05Z",
"published" : "2021-08-25T21:00:41Z",
"aliases" : [ "CVE-2017-1000168" ],
"summary" : "scalarmult() vulnerable to degenerate public keys",
"details" : "The scalarmult() function included in previous versions of this crate accepted all-zero public keys, for which the resulting Diffie-Hellman shared secret will always be zero regardless of the private key used.\n\nThis issue was fixed by checking for this class of keys and rejecting them if they are used.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "sodiumoxide"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.14"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1000168"
}, {
"type" : "WEB",
"url" : "https://github.com/dnaq/sodiumoxide/issues/154"
}, {
"type" : "WEB",
"url" : "https://github.com/sodiumoxide/sodiumoxide/commit/24c7a5550807ac8a09648b5878f19d14c3a69135"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sodiumoxide/sodiumoxide"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2017-0001.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1240" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-05T21:10:47Z",
"nvd_published_at" : null
}
}