fix(deps): update rust crate serde_yml to 0.0.13 [security] #145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/crate-serde_yml-vulnerability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.0.12→0.0.13serde_yml crate is unsound and unmaintained
GHSA-hhw4-xg65-fp2x / RUSTSEC-2025-0068
More information
Details
Using
serde_yml::ser::Serializer.emittercan cause a segmentation fault, which is unsound.The GitHub project for
serde_ymlwas archived after unsoundness issues were raised.If you rely on this crate, it is highly recommended switching to a maintained alternative.
Recommended alternatives
serde_norway- Maintained fork ofserde_yaml, usingunsafe-libyaml-norwayserde_yaml_ng- Maintained fork ofserde_yaml, using unmaintainedunsafe-libyamlIncomplete pure Rust alternatives
These implementation do not rely on C
libyaml.serde_yaml2yaml-pegSeverity
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
sebastienrousseau/serde_yml (serde_yml)
v0.0.13: — Final release (deprecation shim, RUSTSEC-2025-0068 fixed)Compare Source
⚠️ Final release —
serde_ymlis deprecatedThis is the final maintenance release of
serde_yml. The crate is no longer under active development.0.0.13is a thin compatibility shim that lets existing call sites keep compiling while you migrate to one of the maintained alternatives listed below.If you are reading this because
cargo auditflagged your build, upgrading to0.0.13resolves RUSTSEC-2025-0068 structurally — see Security below.TL;DR
Your existing call sites compile unchanged. The compiler now emits a
#[deprecated]warning at everyuse serde_yml::*import pointing at the migration guide. The C-FFIlibymlparser is no longer in your dependency graph.When you're ready to fully migrate, see the migration guide.
Security: RUSTSEC-2025-0068 fixed
RUSTSEC-2025-0068 (also GHSA-hhw4-xg65-fp2x) flagged every
serde_yml ≤ 0.0.12as unsound — theserde_yml::ser::Serializer.emitterfield could cause a segmentation fault via the C-FFIlibyamlparser.0.0.13removes the vulnerable surface entirely:libymldependency is gone from the graph.serde_yml::ser::Serializeris now a re-export of a pure-Rust unit struct (pub struct Serializer;) with noemitterfield — code that referenced.emitterno longer compiles, which is the desired outcome.noyalib) enforces#![forbid(unsafe_code)]workspace-wide.Verification:
The RustSec advisory database PR adding
patched = ["^0.0.13"]is pending review at rustsec/advisory-db#2915. Until it merges,cargo auditmay still warn against0.0.13— the0.0.13release itself ships.cargo/audit.toml+deny.tomlignore entries so the self-referential warning doesn't block your own CI.Maintained alternatives
Three crates are realistic destinations. Pick the one that fits.
noyalibfeatures = ["compat-serde-yaml"]serde_yml-shaped API on a modern, safe, pure-Rust backend with zero call-site changesserde-saphyrValueDOMfrom_str::<MyStruct>) — the 95 % caseyaml-rust2serde_yml::libyml/loader(removed in this shim)Full per-destination mapping tables:
MIGRATION.md.The shim itself is backed by
noyalibinternally — that's an implementation detail, not a recommendation. Pick whichever alternative suits your codebase.What's removed
The deep internal modules that previous versions exposed leaked implementation details of the C-FFI parser. They are gone in this release:
serde_yml::libyml::*(FFI bindings)yaml-rust2for low-level parsing; otherwise n/aserde_yml::loader::Loaderyaml-rust2::YamlLoaderornoyalib::load_all_as::<T>serde_yml::de::{Event, Progress, DocumentAnchor}serde_yml::ser::{SerializerConfig, State}noyalib::ser::Configserde_yml::modules::path::PathError::location()/Error::path()on any alternativeserde_yml::value::IndexValuetypes in the alternatives implementIndex<&str>/Index<usize>nativelyCode calling only the public top-level surface (
from_str/to_string/Value/Mapping/with::singleton_map*) needs no changes.Behavioural notes worth knowing
Two intentionally safer defaults flow through the shim:
Value::Taggedrather than being coerced to the inner string. Code exhaustively matching the previous six-variantValueenum needs either aValue::Tagged(_)arm or a call toValue::untag()/Value::untag_ref()before the match.country: NOstays"NO"(the YAML 1.2 fix to the "Norway problem") instead of becomingfalse.MSRV
0.0.13requires Rust 1.85.0 (the backend's MSRV); the previous releases required 1.56. Users who cannot move past 1.56 should pinserde_yml = "=0.0.12"and plan a migration window — but note that pinning0.0.12keeps RUSTSEC-2025-0068 in your audit feed.Dependencies
The runtime dependency tree dropped from six crates to two:
No
libyml, nounsafe-libyaml, noserde_yaml0.9. Downstreamcargo audit/cargo denyruns stop flagging the unmaintained chain.Documentation
README.md— overview, install, behavioural notesMIGRATION.md— full per-destination mapping tables, removed-surface table, test/example coverage triageSECURITY.md— RUSTSEC-2025-0068 status, supported-versions table, reporting policy#[deprecated]banner on every itemLicense
Dual-licensed under Apache 2.0 or MIT, at your option.
Thanks to everyone who used and contributed to
serde_yml. The crate served its purpose; it's time to move on to maintained, safer alternatives.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Renovate Bot. The local configuration can be found in my Renovate Bot repository.