GHSA-v363-rrf2-5fmj: Ferris says Ferris-says Has Undefined Behavior When Vulnerability
LOWGHSA-v363-rrf2-5fmj is a LOW ferris-says has undefined behavior when vulnerability (General Security Weakness) affecting Ferris says libraries in the crates.io ecosystem. The issue involves ferris-says has undefined behavior when not using utf-8. Remediation is available by upgrading affected packages to version 0.3.1.
GHSA-v363-rrf2-5fmj at a Glance
How to Fix GHSA-v363-rrf2-5fmj
To remediate this vulnerability, upgrade all affected Ferris says 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 ferris-says to 0.3.1
Upgrade ferris-says to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for ferris-says
How to Check if You Are Affected
To determine whether your application is affected by GHSA-v363-rrf2-5fmj, inspect your project dependencies for Ferris says:
inspect dependencies for ferris-says
Analyze the terminal output to locate any version of Ferris says in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.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 General Security Weakness. In Ferris says, 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
GHSA-v363-rrf2-5fmj Affected Ferris says Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ferris-says
|
crates.io |
≥ 0.3.0
< 0.3.1
|
0.3.1
|
|
ferris-says
|
crates.io |
≥ 0.1.2
≤ 0.2.1
|
|
References
Frequently Asked Questions
What is GHSA-v363-rrf2-5fmj?
Which Ferris says versions are affected?
What version fixes GHSA-v363-rrf2-5fmj?
Is ferris-says affected?
What CWE is associated with GHSA-v363-rrf2-5fmj?
How can I check crates.io dependencies for GHSA-v363-rrf2-5fmj?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v363-rrf2-5fmj",
"modified" : "2024-01-17T20:31:11Z",
"published" : "2024-01-17T20:31:11Z",
"aliases" : [ ],
"summary" : "ferris-says has undefined behavior when not using UTF-8",
"details" : "Affected versions receive a `&[u8]` from the caller through a safe API, and pass it directly to the unsafe `str::from_utf8_unchecked` function.\n\nThe behavior of `ferris_says::say` is undefined if the bytes from the caller don't happen to be valid UTF-8.\n\nThe flaw was corrected in [ferris-says#21] by using the safe `str::from_utf8` instead, and returning an error on invalid input. However this fix has not yet been published to crates.io as a patch version for 0.2.\n\nSeparately, [ferris-says#32] has introduced a different API for version 0.3 which accepts input as `&str` rather than `&[u8]`, so is unaffected by this bug.\n\n[ferris-says#21]: https://github.com/rust-lang/ferris-says/pull/21\n[ferris-says#32]: https://github.com/rust-lang/ferris-says/pull/32",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "ferris-says"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.1.2"
}, {
"last_affected" : "0.2.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "ferris-says"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.3.0"
}, {
"fixed" : "0.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rust-lang/ferris-says/pull/21"
}, {
"type" : "WEB",
"url" : "https://github.com/rust-lang/ferris-says/commit/bb661f29e0d88968c495a4ea4dc63ff0e2c2c11a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mgattozzi/ferris-says"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0001.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-17T20:31:11Z",
"nvd_published_at" : null
}
}