CVE-2023-46135: Stellar strkey :from_payload Vulnerability
MODERATECVE-2023-46135 is a MODERATE (CVSS 5.3) :from_payload vulnerability (CWE-248: Uncaught Exception) affecting Stellar strkey libraries in the crates.io ecosystem. The issue involves :from_payload. Remediation is available by upgrading affected packages to version 0.0.8.
CVE-2023-46135 at a Glance
Security Impact
CVSS: 5.3
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:L).
How to Fix CVE-2023-46135
To remediate this vulnerability, upgrade all affected Stellar strkey 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 stellar-strkey to 0.0.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for stellar-strkey
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-46135, inspect your project dependencies for Stellar strkey:
inspect dependencies for stellar-strkey
Analyze the terminal output to locate any version of Stellar strkey in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.8), 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-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In Stellar strkey, 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-2023-46135 Affected Stellar strkey Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
stellar-strkey
|
crates.io |
< 0.0.8
|
0.0.8
|
References
Frequently Asked Questions
What is CVE-2023-46135?
Which Stellar strkey versions are affected?
What version fixes CVE-2023-46135?
Is stellar-strkey affected?
What is the CVSS score of CVE-2023-46135?
What CWE is associated with CVE-2023-46135?
How can I check crates.io dependencies for CVE-2023-46135?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5873-6fwq-463f",
"modified" : "2023-10-25T14:09:10Z",
"published" : "2023-10-25T14:09:10Z",
"aliases" : [ "CVE-2023-46135" ],
"summary" : "stellar-strkey vulnerable to panic in SignedPayload::from_payload",
"details" : "### Impact\nPanic vulnerability when a specially crafted payload is used. \nThis is because of the following calculation:\n```rust\ninner_payload_len + (4 - inner_payload_len % 4) % 4\n```\nIf `inner_payload_len` is `0xffffffff`, `(4 - inner_payload_len % 4) % 4 = 1` so\n```rust\ninner_payload_len + (4 - inner_payload_len % 4) % 4 = u32::MAX + 1\n```\nwhich overflow.\n\n### Patches\nCheck that `inner_payload_len` is not above 64 which should never be the case.\nPatched in version 0.0.8\n\n### Workarounds\nSanitize input payload before it is passed to the vulnerable function so that bytes in `payload[32..32+4]` and parsed as a `u32` is not above 64.\n\n### References\nGitHub issue #58\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "stellar-strkey"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/stellar/rs-stellar-strkey/security/advisories/GHSA-5873-6fwq-463f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-46135"
}, {
"type" : "WEB",
"url" : "https://github.com/stellar/rs-stellar-strkey/issues/58"
}, {
"type" : "WEB",
"url" : "https://github.com/stellar/rs-stellar-strkey/pull/59"
}, {
"type" : "WEB",
"url" : "https://github.com/stellar/rs-stellar-strkey/commit/83adad0f5b1cda693c7ba8524d395add8077865f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/stellar/rs-stellar-strkey"
}, {
"type" : "WEB",
"url" : "https://github.com/stellar/rs-stellar-strkey/releases/tag/v0.0.8"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-10-25T14:09:10Z",
"nvd_published_at" : "2023-10-25T18:17:36Z"
}
}