Heap Buffer Overflow Vulnerability in Grok Package

grok Updated 29 Jun 2026

Summary

27/06/2026
HIGH
Yes i
High
Not published

OSV-2026-981: Heap-buffer-overflow in std::1::function::__func. Affects grok versions >= 152eec18b4770b875be691a2afc333bcd6d725aa, < f76c6e85fcf629f7dc5b961e37f4fefb00ce7c7e. Fixed in f76c6e85fcf629f7dc5b961e37f4fefb00ce7c7e. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Grok package is an open-source library designed for image compression and decompression, particularly focusing on the JP2 (JPEG 2000) format. It provides functionalities for efficient image processing, making it a popular choice among developers working with image data. However, like many software libraries, Grok is susceptible to vulnerabilities that can compromise its integrity and the security of applications that depend on it.

Vulnerability Detail

This vulnerability is a heap buffer overflow that occurs in the function responsible for decompressing JP2 files. It was reported through OSS-Fuzz, indicating that the issue arises during specific operations within the decompression process. The ramifications of this vulnerability can be severe, potentially allowing an attacker to execute arbitrary code or crash the application, leading to denial of service. The technical details reveal that the overflow happens during a write operation, which can corrupt memory and lead to unpredictable behavior.

How To Fix

Minimum fixed version

f76c6e85fcf629f7dc5b961e37f4fefb00ce7c7e

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid processing potentially unsafe JP2 files until they have updated to the patched version. Additionally, implementing input validation to ensure that only safe and properly formatted files are processed can mitigate the risk.

Conclusion

The heap buffer overflow vulnerability in the Grok package poses significant risks to applications that utilize it for image processing. By updating to the patched version and implementing best practices for input validation, developers can safeguard their applications against potential exploits. Tools like Vulert can assist in monitoring for such vulnerabilities in real-time.

See every vulnerability recorded for grok →

Share this vulnerability

FAQ

A heap buffer overflow occurs when a program writes more data to a buffer located on the heap than it can hold, potentially overwriting adjacent memory and leading to unpredictable behavior.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. You can use the Vulert playground without signing up to analyze your manifest file.

Not fixing this vulnerability can lead to severe security risks, including arbitrary code execution, data corruption, or application crashes, which can compromise the integrity of your application.

Yes, the safe version of Grok is the one after the commit 'f76c6e85fcf629f7dc5b961e37f4fefb00ce7c7e'. Make sure to update to this version to avoid the vulnerability.

Using tools like Vulert can help you monitor and receive alerts for vulnerabilities in your open-source dependencies, ensuring you are always informed about potential risks.

Related vulnerabilities

Recent vulnerabilities recorded for grok.

How To Fix

Minimum fixed version

f76c6e85fcf629f7dc5b961e37f4fefb00ce7c7e

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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