Advisory Database
  • Advisories
  • Dependency Scanning
  1. swift
  2. ›
  3. github.com/square/wire
  4. ›
  5. CVE-2026-61695

CVE-2026-61695: Wire Swift runtime: negative LENGTH_DELIMITED length in skipGroup() crashes any protobuf-decoding service

September 23, 2026

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.

References

  • github.com/advisories/GHSA-86wm-r4c5-2rc9
  • github.com/square/wire/commit/24043b6b3a5e5974a978f2745b76d50b31407c1c
  • github.com/square/wire/commit/81ff7f24a6795d9a8be2e03f272b2d979a5d2c7e
  • github.com/square/wire/pull/3616
  • github.com/square/wire/releases/tag/6.4.1
  • github.com/square/wire/releases/tag/7.0.0-alpha04
  • github.com/square/wire/security/advisories/GHSA-86wm-r4c5-2rc9
  • nvd.nist.gov/vuln/detail/CVE-2026-61695

Detect and mitigate CVE-2026-61695 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 6.4.1

Fixed versions

  • 6.4.1

Solution

Upgrade to version 6.4.1 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-129: Improper Validation of Array Index

Source file

swift/github.com/square/wire/CVE-2026-61695.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 24 Sep 2026 12:24:39 +0000.