DHI-ls7v-ceud-5mvh-ucmq

Source
https://scout.docker.com/v/DHI-ls7v-ceud-5mvh-ucmq
Import Source
https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-ls7v-ceud-5mvh-ucmq.json
JSON Data
https://api.osv.dev/v1/vulns/DHI-ls7v-ceud-5mvh-ucmq
Upstream
Published
2026-11-13T22:17:34Z
Modified
2026-11-21T02:30:32Z
Severity
  • 5.1 (Medium) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N CVSS Calculator
Summary
### Summary
Details

Summary

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.

Details

The affected public surface includes:

  • Serialization of #[serde_as(as = "KeyValueMap<_>")] values through serde_json::to_string or any other Serde serializer`
  • Public KeyValueMap conversions for sequence and map-backed entries`

The 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.

The vulnerable data/control flow is: attacker-controlled empty entry -> serde_json::to_string -> KeyValueMap<TAs>::serialize_as -> SeqAsMapSerializer::{serialize_seq,serialize_map} -> Vec::with_capacity(len - 1) or Vec::with_capacity(len.unwrap_or(17) - 1) -> panic

Relevant source locations:

  • serde_with/src/key_value_map.rs:590
  • serde_with/src/key_value_map.rs:599
  • serde_with/src/key_value_map.rs:613
  • serde_with/src/key_value_map.rs:632
  • serde_with/src/key_value_map.rs:648

PoC

/*
[dependencies]
serde = {version = "*", features = ["derive"]}
serde_with = "*"
serde_json = "*"
*/

use serde::Serialize;
use serde_with::{serde_as, KeyValueMap};

#[derive(Serialize)]
#[serde(transparent)]
struct Seq(Vec<String>);

#[serde_as]
#[derive(Serialize)]
#[serde(transparent)]
struct KVMap {
    #[serde_as(as = "KeyValueMap<_>")]
    foo: Vec<Seq>,
}

fn main() {
    let value = KVMap {
        foo: vec![Seq(Vec::new())],
    };
    let _ = serde_json::to_string(&value).unwrap();
}

Impact

A local attacker who can trigger serialization of attacker-controlled data through KeyValueMap can terminate the process, causing a denial of service.

References

Affected packages

Docker Hardened Images:Alpine:3.24 / gitlab-rails-19

Package

Name
gitlab-rails-19
Purl
pkg:apk/dhi/gitlab-rails-19

Affected ranges

Affected versions

19.*
19.1.8-r0
19.1.8-r1
19.4.1-r0
19.4.1-r1
19.4.1-r2
19.4.1-r3
19.4.2-r0
19.5.3-r0
19.5.3-r1
19.5.3-r2
19.5.3-r3
19.5.3-r4
19.5.3-r5
19.5.3-r6
19.5.3-r7
19.5.3-r8
19.5.4-r0
19.5.4-r1
19.5.5-r0
19.5.5-r1
19.5.5-r2
19.5.6-r0
19.5.6-r1
19.6.0-r0
19.6.0-r1
19.6.1-r0
19.6.1-r1

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-ls7v-ceud-5mvh-ucmq.json"

Docker Hardened Images:Alpine:3.23 / rust

Package

Name
rust
Purl
pkg:apk/dhi/rust

Affected ranges

Affected versions

1.*
1.91.1-r0
1.91.1-r2
1.91.1-r3
1.91.1-r4
1.93.1-r0
1.93.1-r1
1.94.0-r0
1.94.0-r1
1.94.1-r0
1.94.1-r1
1.95.0-r0
1.96.0-r0
1.96.1-r0
1.97.0-r0
1.97.0-r1
1.98.1-r0
1.99.0-r2
1.99.1-r0

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-ls7v-ceud-5mvh-ucmq.json"

Docker Hardened Images:Debian:13 / gitlab-rails-19

Package

Name
gitlab-rails-19
Purl
pkg:deb/dhi/gitlab-rails-19

Affected ranges

Affected versions

19.*
19.1.8-0
19.1.8-1
19.4.1-0
19.4.1-1
19.4.1-2
19.4.2-0
19.5.3-0
19.5.3-1
19.5.3-2
19.5.3-3
19.5.3-4
19.5.3-5
19.5.3-6
19.5.3-7
19.5.3-8
19.5.3-9
19.5.4-0
19.5.4-1
19.5.5-0
19.5.5-1
19.5.5-2
19.5.5-3
19.5.5-4
19.5.5-5
19.5.5-6
19.5.5-7
19.5.5-8
19.5.5-9
19.5.5-10
19.5.5-11
19.5.6-0
19.5.6-1
19.5.6-2
19.5.6-3
19.5.6-4
19.5.6-5
19.6.0-0
19.6.0-1
19.6.0-2
19.6.1-0
19.6.1-1

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-ls7v-ceud-5mvh-ucmq.json"