Heap Buffer Overflow Vulnerability in QuickJS Package

quickjs Updated 02 Oct 2025

Summary

09/07/2025
MEDIUM
Yes i
Medium
Not published

OSV-2025-541: Heap-buffer-overflow in js_create_function. Affects quickjs versions >= f1b1c000c2a05972c1834f306786d2b41f767ef5, < fa628f8c523ecac8ce560c081411e91fcaba2d20. Fixed in fa628f8c523ecac8ce560c081411e91fcaba2d20. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

QuickJS is a lightweight and embeddable JavaScript engine developed by Fabrice Bellard. It is designed for performance and small footprint, making it suitable for various applications, including IoT devices and web browsers. However, like many software packages, QuickJS is susceptible to vulnerabilities that can compromise its functionality and security.

Vulnerability Detail

The vulnerability identified in QuickJS is a heap buffer overflow that occurs during the execution of JavaScript functions. This issue arises from improper memory management in the js_create_function function, leading to potential crashes and exploitation. The vulnerability was reported through OSS-Fuzz, highlighting its severity and the need for immediate attention to prevent possible exploitation in production environments.

How To Fix

Minimum fixed version

fa628f8c523ecac8ce560c081411e91fcaba2d20

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, avoid using the specific JavaScript functions that trigger the vulnerability until the package is updated. Monitor the application for any unusual behavior that may indicate exploitation attempts.

Conclusion

The heap buffer overflow vulnerability in the QuickJS package poses a significant risk to applications utilizing this JavaScript engine. It is crucial to update to the patched version to mitigate potential exploitation. Users are encouraged to monitor their applications and utilize tools like Vulert for ongoing vulnerability management.

See every vulnerability recorded for quickjs →

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 crashes or security vulnerabilities.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By simply using a manifest file like package-lock.json, you can check if your application is affected without needing to access the code.

If exploited, this vulnerability could lead to application crashes, unauthorized access to sensitive data, or remote code execution, compromising the security of the entire system.

Yes, you can temporarily avoid using the affected functions and monitor your application for any unusual behavior that may indicate an exploitation attempt.

Detailed information about this vulnerability can be found in the OSS-Fuzz report at https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=430091578.

Related vulnerabilities

Recent vulnerabilities recorded for quickjs.

How To Fix

Minimum fixed version

fa628f8c523ecac8ce560c081411e91fcaba2d20

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