org.apache.kafka:kafka-streams@4.1.2

  • latest version

    4.4.0

  • latest non vulnerable version

  • first published

    10 years ago

  • latest version published

    1 months ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.apache.kafka:kafka-streams 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
    • M
    Infinite loop

    org.apache.kafka:kafka-streams is a streaming platform that can publish and subscribe to streams of records, store streams of records in a fault-tolerant durable way, and process streams of records as they occur.

    Affected versions of this package are vulnerable to Infinite loop via the next() method in PunctuationSchedule. An attacker can stall a StreamThread indefinitely by writing a record timestamped at or near Long.MAX_VALUE to a source topic used by a topology with stream-time punctuation; the overflowed next punctuation time is re-queued by PunctuationQueue, which loops while holding a lock and stops processing. Exploitation requires write access to the topic and a broker that accepts the timestamp: Apache Kafka 4.0.0 brokers reject such timestamps by default because log.message.timestamp.after.max.ms is limited to one hour, so the trigger is possible on older brokers or when that limit is relaxed. Because the record remains in the topic, the hang returns after a restart.

    Notes

    • At the impact stage, the hang is confined to the Kafka Streams application, not the brokers or cluster; application-wide unresponsiveness requires all its partitions to be affected.

    Workarounds

    • Keep log.message.timestamp.after.max.ms bounded for source topics to prevent records with timestamps near Long.MAX_VALUE from being stored.
    • Restrict write access to source topics used by Kafka Streams topologies with stream-time punctuation to prevent unauthorized clients from publishing triggering records.

    How to fix Infinite loop?

    Upgrade org.apache.kafka:kafka-streams to version 4.2.2, 4.3.2 or higher.

    [1.1.0,4.2.2)[4.3.0,4.3.2)