com.squareup.wire:wire-runtime@5.0.0-alpha02

  • latest version

    7.1.0

  • latest non vulnerable version

  • first published

    13 years ago

  • latest version published

    14 days ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the com.squareup.wire:wire-runtime package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Integer Overflow or Wraparound

    Affected versions of this package are vulnerable to Integer Overflow or Wraparound via the ByteArrayProtoReader32 fast path in wire-runtime/src/commonMain/kotlin/com/squareup/wire/ByteArrayProtoReader32.kt. An attacker can crash protobuf decoding by supplying a length-delimited field with a large positive 32-bit length, which overflows the reader’s cursor math when limit = pos + length is computed during ProtoAdapter.decode(ByteArray) or ProtoAdapter.decode(ByteString). Malformed input can turn what should be a normal decode failure into unchecked runtime exceptions such as IllegalArgumentException or ArrayIndexOutOfBoundsException. Applications that decode attacker-controlled protobuf bytes can be taken down by a single short payload.

    Workarounds

    • Reject attacker-controlled protobuf payloads at the service boundary before passing them to Wire, or cap the maximum message size so oversized length-delimited fields cannot reach ProtoAdapter.decode(ByteArray) / ProtoAdapter.decode(ByteString).
    • Prefer decoding from a bounded source instead of unbounded attacker-controlled byte arrays, which limits the impact of malformed length-delimited input that can otherwise trigger a crash.
    • Treat unchecked runtime exceptions from protobuf decoding as malformed-input failures and contain them at the trust boundary, so a bad payload cannot terminate request handling or the process.

    How to fix Integer Overflow or Wraparound?

    Upgrade com.squareup.wire:wire-runtime to version 6.4.5, 7.0.0-alpha04 or higher.

    [,6.4.5)[7.0.0-alpha01,7.0.0-alpha04)
    • H
    Improper Validation of Array Index

    Affected versions of this package are vulnerable to Improper Validation of Array Index in the skipGroup function. An attacker can cause a service crash by sending a crafted protobuf payload with a negative length in a length-delimited field inside a group, leading to an unchecked runtime exception that escapes the documented error handling.

    How to fix Improper Validation of Array Index?

    Upgrade com.squareup.wire:wire-runtime to version 6.3.0, 7.0.0-alpha03 or higher.

    [,6.3.0)[7.0.0-alpha01,7.0.0-alpha03)
    • M
    Uncontrolled Recursion

    Affected versions of this package are vulnerable to Uncontrolled Recursion due to improper enforcement of recursion limits in ByteArrayProtoReader32.kt and ProtoReader.kt. An attacker can cause a denial of service by sending deeply nested group structures.

    How to fix Uncontrolled Recursion?

    Upgrade com.squareup.wire:wire-runtime to version 5.2.0 or higher.

    [,5.2.0)