Integer Overflow Vulnerability in snappy-java Package Leading to Fatal Errors

snappy-java Updated 02 Oct 2025

Summary

15/06/2023
N/A
No i
Medium
5.9

UBUNTU-CVE-2023-34454: snappy-java is a fast compressor/decompressor for Java. Affects snappy-java versions 1.0.4.1~dfsg-1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

snappy-java is a fast compressor/decompressor library for Java, designed to provide efficient data compression and decompression capabilities. It is widely used in various applications to enhance performance by reducing the size of data. However, certain versions of snappy-java are vulnerable to an integer overflow issue that can lead to severe application crashes and data loss.

Vulnerability Detail

The vulnerability arises from unchecked multiplications in the compress functions of snappy-java, specifically in the compress(char[] input) method. When the length of the input array is multiplied by two, it can result in an integer overflow, causing the length to become negative. This negative length is then passed to the native maxCompressedLength function, which treats it as an unsigned integer, potentially leading to a java.lang.NegativeArraySizeException when attempting to allocate an array. If the allocation succeeds with a positive size, it may still be insufficient for the compression process, resulting in fatal access violations. This vulnerability affects multiple data types, including char, double, float, int, long, and short, but is less likely to occur with byte arrays. The issue is patched in version 1.1.10.1.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, avoid using the compress functions that involve unchecked multiplications until the package is updated. Consider validating input lengths before passing them to the compression functions to prevent potential overflows.

Conclusion

The integer overflow vulnerability in the snappy-java package poses significant risks to applications relying on this library for data compression. It is crucial to update to the patched version 1.1.10.1 or later to mitigate these risks. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security and integrity of your software.

See every vulnerability recorded for snappy-java →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.9, indicating a medium severity level.

Versions prior to 1.1.10.1 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The vulnerability can lead to application crashes, data loss, and potential access violations, impacting the stability and reliability of applications using the affected versions.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for snappy-java.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback