GHSA-v363-rrf2-5fmj — ferris-says
Fix: rust-lang/ferris-says#21GHSA-v363-rrf2-5fmj is a security vulnerability in ferris-says. A fix is available for ferris-says — see the affected versions and patch details below.
ferris-says has undefined behavior when not using UTF-8
Real-World Exposure
ferris-says🦀ferris-saysReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
Affected versions receive a &[u8] from the caller through a safe API, and pass it directly to the unsafe str::from_utf8_unchecked function.
The behavior of ferris_says::say is undefined if the bytes from the caller don't happen to be valid UTF-8.
The 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.
Separately, 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | ferris-says | ≥ 0.1.2 | No fix |
| 🦀crates.io | ferris-says | ≥ 0.3.0&&< 0.3.1 | 0.3.1cargo update -p ferris-says --precise 0.3.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for ferris-says, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
No patched version of ferris-says has shipped for GHSA-v363-rrf2-5fmj yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-v363-rrf2-5fmj can be triaged on real exposure rather than presence alone.
Tailored to GHSA-v363-rrf2-5fmj. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-v363-rrf2-5fmj in your dependencies?
O3 Security finds GHSA-v363-rrf2-5fmj across crates.io dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.