Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions crates/serde_yaml/RUSTSEC-0000-0000.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
```toml
[advisory]
id = "RUSTSEC-0000-0000"
package = "serde_yaml"
date = "2025-11-16"
url = "https://github.com/dtolnay/serde-yaml/blob/master/README.md"
informational = "unmaintained"

[versions]
patched = []
```

# serde_yaml crate is unmaintained

The `serde_yaml` crate is no longer actively maintained. If you rely on this crate, consider switching to a recommended alternative.

While there are maintained forks of `serde_yaml`, none of them can be recommended as they either use the
unmaintained `unsafe-libyaml`, or they use a fork of `unsafe-libyaml` which do not resolve the underlying security problems
of `libyaml`.

## Recommended alternatives

- [`yaml-spanned`](https://crates.io/crates/yaml-spanned) - Deserializer only.
- [`serde_yaml2`](https://crates.io/crates/serde_yaml2) - Incomplete implementation of serde framework.
- [`serde-saphyr`](https://crates.io/crates/serde-saphyr) - Not complete implementation of YAML 1.2 or serde framework.
Copy link

@bourumir-wyngs bourumir-wyngs Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to replace this by

 [`serde-saphyr`](https://crates.io/crates/serde-saphyr) - Implementation of YAML for serde framework, replaces unsafe-libyaml by saphyr-parser.

While the library is relatively young, "incomplete" implies that this is a stub that lacks all the necessary functionality. This is not the case.

Copy link
Contributor Author

@jayvdb jayvdb Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bourumir-wyngs I am not happy with that alternative you provide, but I do understand what you are getting at.

The main point that must be conveyed is that serde-saphyr is not a complete implementation of YAML 1.2, because saphyr-parser is still incomplete wrt YAML 1.2 spec. Very incomplete. I have lots of types of data structures that worked with serde_yaml that fail inside saphyr-parser. It did work for a few simpler data structures, and I adopted it for those. But it is not nearly as good at yaml-spanned, and it is roughly on par with serde_yaml2 based on my usage.

To be honest, I am not sure how complete serde-saphyr is wrt to the serde framework. i.e. which issues are due to serde-saphyr immaturity vs problems it inherits from saphyr-parser and cant fix until saphyr-parser improves. It is a bit difficult for an outside observer to easily identify which is the cause of the problems. That said, from what I saw, there is a bit of both to blame for the problems I saw trying to migrate a very large commercial codebase to serde-saphyr.

Copy link

@bourumir-wyngs bourumir-wyngs Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While saphyr-parser needs more work, I do not see where else would be the way to go. yaml-spanned you talk about uses internally libyaml-safer that is, again, the fork of the same unsafe-libyaml. Having cascades of unsafe there is fundamentally a problem, memory safety is on the main Rust's selling points.

Serde-saphyr currently has 618 passing tests, many of which were ported from the yaml-test-suite (those with a y_prefix), and also quite many from serde-yaml. If you would share at least some of these "lots" structures that do not work, I would be thankful. yaml-rust2 (from whom saphyr-parser is the fork with modern features) has 19,601,133 downloads to date so I think works for some.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/saphyr-rs/saphyr/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen lists the many fundamental issues with saphyr-parser wrt YAML. And I ran into many of those. It changes the data-type of incoming data. And that blows up your serde layer on top of it in weird ways.

- [`yaml-peg`](https://crates.io/crates/yaml-peg) - Not complete implementation of YAML 1.2 or serde framework.
27 changes: 27 additions & 0 deletions crates/unsafe-libyaml/RUSTSEC-0000-0000.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
```toml
[advisory]
id = "RUSTSEC-0000-0000"
package = "unsafe-libyaml"
date = "2025-11-16"
url = "https://github.com/rustsec/advisory-db/issues/2132"
informational = "unmaintained"

[versions]
patched = []
```

# unsafe-libyaml crate is unmaintained

The `unsafe-libyaml` crate is no longer actively maintained. If you rely on this crate, consider switching to a maintained alternative.

## Recommended alternatives

- [`libyaml-safer`](https://crates.io/crates/libyaml-safer)
- [`saphyr-parser`](https://crates.io/crates/saphyr-parser) - Parser only.
- [`yaml-rust2`](https://crates.io/crates/yaml-rust2) - [Maintenance mode only](https://github.com/Ethiraric/yaml-rust2/issues/26)
- [`yaml_parser`](https://crates.io/crates/yaml_parser) & [`pretty_yaml`](https://crates.io/crates/pretty_yaml)
- [`yaml-spanned`](https://crates.io/crates/yaml-spanned) - Parser only.
- [`yaml-peg`](https://crates.io/crates/yaml-peg) - Not complete implementation of YAML 1.2
- [`rust-yaml`](https://crates.io/crates/rust-yaml)
- [`yaml_lib`](https://crates.io/crates/yaml_lib)
- [`oak-yaml`](https://crates.io/crates/oak-yaml)