CVE-2026-63126
largeInteger-Overflow DoS in Square Wire protobuf library (Android, Kotlin, Java, Swift)
Square's Wire library, a protobuf and gRPC runtime for Android, Kotlin, Java, and Swift, does not consistently validate attacker-controlled length fields against the current logical message boundary before advancing cursors, pointers, limits, slices, or allocations (CWE-190, integer overflow/wraparound). In the Kotlin runtime, a positive oversized length in ByteArrayProtoReader32.internalNextLengthDelimited() (reachable via ProtoAdapter.decode(ByteArray) and decode(ByteString)) can wrap pos + length to a negative limit and bypass the existing negative-length check, with similar boundary-crossing, pointer-arithmetic, capacity-reservation, and unrepresentable-size-conversion issues in ProtoReader, ReadBuffer.readVarint(), ReadBuffer.verifyAdditional(count:), packed-repeated and nested-message handling, and ProtoDecoder.decodeSizeDelimited(_:from:). An attacker who can supply malformed protobuf bytes to any affected decode path, typically over the network where apps or services parse untrusted protobuf, can trigger unchecked exceptions, traps, out-of-bounds behavior, or excessive allocation, causing denial of service with no known confidentiality, integrity, or code-execution impact. All applications and services built with Wire versions prior to 6.4.5, or 7.0.0-alpha pre-releases prior to 7.0.0-alpha04, are affected. No public proof-of-concept, CISA KEV listing, or known in-the-wild exploitation has been reported.
What to do: Upgrade Wire to 6.4.5 on the stable line, or to 7.0.0-alpha04 or later on the alpha line. Audit code paths that decode attacker-controlled protobuf bytes — especially ProtoAdapter.decode(ByteArray)/decode(ByteString) and ProtoDecoder.decodeSizeDelimited(_:from:) — and enforce application-level message-size limits or crash handling around decoding. Services that only exchange protobuf with trusted peers face materially lower risk since exploitation requires malformed input to reach these decoders.
| Square (Block, Inc.) Wire protobuf/gRPC library for Android, Kotlin, Java, and Swift (stable releases) | all versions prior to 6.4.5 |
| Square (Block, Inc.) Wire protobuf/gRPC library for Android, Kotlin, Java, and Swift (7.0.0-alpha pre-releases) | prior to 7.0.0-alpha04 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Wire provides gRPC and protocol buffers for Android, Kotlin, Swift, and Java. Prior to 6.4.5 and 7.0.0-alpha04, Wire protobuf readers do not consistently validate attacker-controlled lengths against the current logical message boundary before advancing cursors, pointers, limits, slices, or allocations. In Kotlin, ProtoAdapter.decode(ByteArray) and ProtoAdapter.decode(ByteString) use ByteArrayProtoReader32.internalNextLengthDelimited(), where a positive oversized length can wrap pos + length to a negative limit and escape the existing negative-length check. Related ProtoReader, ReadBuffer.readVarint(), ReadBuffer.verifyAdditional(count:), packed-repeated, nested-message, and ProtoDecoder.decodeSizeDelimited(_:from:) paths can cross logical boundaries, perform pointer arithmetic, reserve capacity, or convert an unrepresentable size before proving the requested bytes exist. An attacker who supplies malformed protobuf bytes can cause unchecked exceptions, traps, out-of-bounds behavior, or excessive allocation, resulting in denial of service without known confidentiality, integrity, or code-execution impact. This issue is fixed in versions 6.4.5 and 7.0.0-alpha04.
- Weakness
- CWE-190
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
In the news0 stories
No ingested article mentions this CVE yet.