GHSA-7gcf-g7xr-8hxj: serde_with: KeyValueMap serialization panics on empty sequence or map entries
(updated )
The public KeyValueMap serializer assumes that each mapped element has at least one field or item to use as the map key, but it subtracts 1 from the caller-visible length before validating that assumption. An application that serializes attacker-controlled data through #[serde_as(as = "KeyValueMap<_>")] can be crashed by an empty inner sequence or map entry.
References
- github.com/advisories/GHSA-7gcf-g7xr-8hxj
- github.com/jonasbb/serde_with/commit/c8a1d820ea25df01692b367058d587343e199389
- github.com/jonasbb/serde_with/compare/v2.2.0...v2.3.0
- github.com/jonasbb/serde_with/pull/966
- github.com/jonasbb/serde_with/releases/tag/v3.21.0
- github.com/jonasbb/serde_with/security/advisories/GHSA-7gcf-g7xr-8hxj
Code Behaviors & Features
Detect and mitigate GHSA-7gcf-g7xr-8hxj with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →