Junglewise Threat Intelligence

CVE-2026-63126: Wire protobuf decoder integer overflow denial of service

CVE-2026-63126 · Severity: high · CVSS 7.5 · Published 2026-09-17

Executive brief

Wire is a protobuf serialization library used by applications to decode structured data. When decoding malformed protobuf messages with oversized length fields, Wire's decoders fail with uncaught runtime exceptions (crashes) rather than normal error handling, allowing attackers to crash services by sending crafted protobuf payloads. The vulnerability affects both Kotlin and Swift versions when processing attacker-controlled protobuf bytes.

Technical details

Wire's protobuf decoders mix untrusted length decoding, validation, and cursor advancement in the wrong order. In Kotlin's ByteArrayProtoReader32.internalNextLengthDelimited(), an attacker-controlled varint length is read into a signed 32-bit Int. The original code rejected only negative lengths (< 0 check), but a length of 2147483647 passes this check and then overflows when added to the current position: pos + length wraps around to a negative limit. This invalid limit bypasses the subsequent if (limit > pushedLimit) guard and propagates to downstream string, bytes, skip, and scalar-read operations as an invalid range, triggering unchecked exceptions like IllegalArgumentException ("startIndex > endIndex") or ArrayIndexOutOfBoundsException. Swift's ReadBuffer.readVarint() dereferences pointer.pointee before validating that a byte exists, enabling out-of-bounds reads. Nested-message and packed-repeated decoders compute end pointers before proving the buffer contains the requested bytes. Size-delimited decoders convert untrusted UInt64 sizes to Int without overflow checking, risking traps on platforms where the value is unrepresentable. The fix enforces a uniform invariant: every decoded byte count must be non-negative and must fit within the current logical message boundary before any cursor, pointer, allocation, or slice is advanced. Patches: Kotlin (6.4.5, 7.0.0-alpha04), Swift runtime hardened in PR #3635.

Affected products

  • Square Wire 6.4.4 and earlier; 7.0.0-alpha01 to 7.0.0-alpha03

Timeline

  • 2026-09-17: disclosed
  • 2026-07-14: advisory: CVE-2026-63126 published
  • 2026-09-17: patched: Patched in Wire 6.4.5 and 7.0.0-alpha04 via commit 25ebcabb9ab7f12d1d77af75ecbc51726fddc015 (PR #3635)

References