Heap-buffer-overflow in Gfx::decode_bmp_pixel_data in SerenityOS

serenity Updated 02 Oct 2025

Summary

30/09/2023
MEDIUM
Yes i
Medium
Not published

OSV-2023-936: Heap-buffer-overflow in Gfx::decode_bmp_pixel_data. Affects serenity versions >= a52089452226ce7327c5557ae10b8450b9cc2fee, < fd157b9a711dfd908392b2ddbaf13cb0ef292886. Fixed in fd157b9a711dfd908392b2ddbaf13cb0ef292886. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

SerenityOS is an open-source operating system that aims to provide a modern and user-friendly interface. It offers various functionalities and features, including support for image decoding. However, a vulnerability has been discovered in the Gfx::decode_bmp_pixel_data function, which is used for decoding BMP image data. This vulnerability can lead to a heap-buffer-overflow when reading data, potentially resulting in a crash or arbitrary code execution.

Vulnerability Detail

The vulnerability originates from a heap-buffer-overflow in the Gfx::decode_bmp_pixel_data function of SerenityOS. When processing BMP image data, the function fails to properly validate the input, leading to a buffer overflow. This can be exploited by an attacker to overwrite adjacent memory and potentially execute arbitrary code or cause a denial-of-service condition. The issue has been reported in the OSS-Fuzz project, and more details can be found in the provided link.

How To Fix

Minimum fixed version

fd157b9a711dfd908392b2ddbaf13cb0ef292886

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

At the moment, there is no known workaround for this vulnerability. It is crucial to update the SerenityOS package to a patched version as soon as possible.

Conclusion

In conclusion, a heap-buffer-overflow vulnerability has been discovered in the Gfx::decode_bmp_pixel_data function of SerenityOS. This vulnerability can be mitigated by updating the SerenityOS package to a version that includes the fix. It is important to apply the patch as soon as possible to prevent potential crashes or arbitrary code execution. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for serenity →

Share this vulnerability

FAQ

SerenityOS is an open-source operating system that aims to provide a modern and user-friendly interface.

This vulnerability can lead to a heap-buffer-overflow, potentially resulting in a crash or arbitrary code execution.

To fix this vulnerability, update the SerenityOS package to a version that includes the patch for this issue.

No, there is currently no known workaround for this vulnerability.

More information about this vulnerability can be found in the provided OSS-Fuzz report link.

Related vulnerabilities

Recent vulnerabilities recorded for serenity.

How To Fix

Minimum fixed version

fd157b9a711dfd908392b2ddbaf13cb0ef292886

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