Wire's Swift runtime (Wire SPM/CocoaPods product, implemented by
wire-runtime-swift) did not reject a negative LENGTH_DELIMITED field length
while skipping an unknown protobuf group. A crafted 10-byte protobuf payload
could cause ProtoReader.skipGroup() to read a length-delimited field whose
varint decodes to a negative Int32. That negative value was then passed to
ReadBuffer.readData(count:).
ReadBuffer checked only that the requested read did not go past the end of
the buffer. It did not reject negative counts. As a result, a negative count
could pass the bounds check and reach Foundation's Data(bytes:count:), which
traps and aborts the process (Signal 5 / SIGTRAP) instead of throwing Wire's
documented ProtoDecoder.Error.
This is the Swift sibling of the Kotlin/JVM negative-length-in-skipGroup()
issue fixed in com.squareup.wire:wire-runtime 6.3.0
(CVE-2026-45799, GHSA-7xpr-hc2w-34m9). That earlier fix added a
length < 0 rejection to the Kotlin readers. The functionally similar Swift
ProtoReader.skipGroup() path was not covered by that fix and remained
vulnerable in released Swift runtime versions through 6.4.0, and in Wire 7
alpha releases through 7.0.0-alpha03.
The issue is fixed for the supported 6.x release line in Wire 6.4.1.
skipGroup() runs for any unknown field with wire type 3 (START_GROUP), so
no schema knowledge is required. A service decoding any message type with
ProtoDecoder.decode(_:from:) over untrusted bytes can be reached by sending an
unknown group field.
Denial of service.
A single 10-byte attacker-controlled protobuf payload can abort the process
with an unrecoverable runtime trap. Callers following Wire's documented Swift
API generally expect ProtoDecoder.decode(_:from:) to throw catchable decoding
errors such as ProtoDecoder.Error. They cannot catch a SIGTRAP from
Foundation's Data(bytes:count:).
Any Swift process that decodes untrusted protobuf data with...
6.4.1Exploitability
AV:NAC:LPR:NUI:NScope
S:UImpact
C:NI:NA:H7.5/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HOther