CVE-2026-61657: zserio-runtime: Incomplete fix for GHSA-cwq5-8pvq-j65j — Array.read() bounds check skipped for variable-size element types (String, Object)
Zserio is a framework for serializing structured data with a compact and efficient way with low overhead. The fix for GHSA-cwq5-8pvq-j65j shipped in zserio-runtime 2.18.1 is incomplete. Prior to version 2.18.2, the new bounds check in Array.read() is gated on arrayTraits.isBitSizeOfConstant(), which returns false for variable-size element types including strings and complex structs. For those types the check is never reached, rawArray.reset(readSize) executes unconditionally with an attacker-controlled value, and a 5-byte payload declaring Integer.MAXVALUE elements causes an attempted ~16 GB heap allocation that crashes any process parsing untrusted zserio data — with no authentication required. This issue has been patched in version 2.18.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
zserio-runtimeto a version that resolves this vulnerability.Fixed in 2.18.2
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Any process that parses untrusted zserio data using zserio-runtime versions before 2.18.2 is exposed when it reads arrays whose elements have variable size, including strings and complex structs. No authentication is required for exploitation.
What does an attacker need to send to trigger the denial of service?
An attacker needs to provide crafted zserio data containing a variable-size-element array with an attacker-controlled declared element count. A 5-byte payload declaring Integer.MAX_VALUE elements can cause an attempted heap allocation of roughly 16 GB and crash the parsing process.
Are fixed-size arrays affected in the same way?
The described bypass applies to variable-size element types because the bounds check is gated on arrayTraits.isBitSizeOfConstant(), which returns false for strings and complex structs. For those types, rawArray.reset(readSize) executes with the attacker-controlled size.
What version fixes the issue?
Upgrade zserio-runtime to version 2.18.2. The earlier 2.18.1 fix for GHSA-cwq5-8pvq-j65j is incomplete for variable-size array elements.