{"items":[{"id":"NVI-00014082","kind":"vulnerability","title":"serde_with: KeyValueMap serialization panics on empty sequence or map entries","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-7gcf-g7xr-8hxj"],"plain_summary":"GitHub lists this reviewed advisory for serde_with. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-42014655e3c4fc9d12fcfbf2d48f4e5a"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-42014655e3c4fc9d12fcfbf2d48f4e5a","url":"https://github.com/advisories/GHSA-7gcf-g7xr-8hxj","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-7gcf-g7xr-8hxj","publisher":"GitHub Advisory Database","observed_at":"2026-11-02T02:21:58.521Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-42014655e3c4fc9d12fcfbf2d48f4e5a"],"technology":"serde_with","known_exclusions":[],"conditions_summary":"### Summary\n\nThe 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.\n\n### Details\n\nThe affected public surface includes:\n\n- Serialization of `#[serde_as(as = \"KeyValueMap\")]` values through `serde_json::to_string` or any other Serde serializer`\n- Public `KeyValueMap` conversions for sequence and map-backed entries`\n\nThe root cause is: The `KeyValueMap` serializer preallocating `Vec::with_capacity(len - 1)` or `Vec::with_capacity(len.unwrap_or(17) - 1)` before checking that the element actually contains the required first key field or item.\n\nThe vulnerable data/control flow is: attacker-controlled empty entry -> `serde_json::to_string` -> `KeyValueMap::serialize_as` -> `SeqAsMapSerializer::{serialize_seq,serialize_map}` -> `Vec::with_capacity(len - 1)` or `Vec::with_capacity(len.unwrap_or(17) - 1)` -> panic\n\nRelevant source locations:\n\n- `serde_with/src/key_value_map.rs","public_affected_ranges":[">= 2.3.0, < 3.21.0"]}],"null_published_at":"2026-11-02T10:00:37.205Z","source_updated_at":"2026-08-31T14:18:16.000Z","source_disclosed_at":"2026-07-15T22:41:01.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-02T02:21:58.521Z"}],"next_cursor":null,"snapshot_revision":"42594"}