Heap-Use-After-Free Vulnerability in QuickJS: Critical Memory Management Flaw

quickjs Updated 02 Oct 2025

Summary

05/05/2025
HIGH
Yes i
High
Not published

OSV-2025-326: Heap-use-after-free in __JS_FreeValueRT. Affects quickjs versions >= be06b3e92b77a343adefa49a4b29e1ad523014ea, < 11d076fac6691da27df021872cdb12ec44d022e6. Fixed in 11d076fac6691da27df021872cdb12ec44d022e6. 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 designed for performance and efficiency. It supports modern JavaScript features and is often used in applications requiring a scripting engine. However, like many software packages, it is susceptible to vulnerabilities that can compromise its integrity and security. The specific vulnerability in question relates to improper memory management, leading to potential exploitation through heap-use-after-free scenarios.

Vulnerability Detail

The vulnerability identified as OSV-2025-326 is a heap-use-after-free issue occurring in the __JS_FreeValueRT function of QuickJS. This flaw arises when the memory allocated for certain objects is freed while still being referenced, leading to potential crashes or arbitrary code execution. The vulnerability was reported through OSS-Fuzz, highlighting a crash state that indicates a write operation to freed memory, which can be exploited by attackers to manipulate the program's execution flow.

How To Fix

Minimum fixed version

11d076fac6691da27df021872cdb12ec44d022e6

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

Currently, there are no specific workarounds mentioned for this vulnerability. It is strongly recommended to update to the patched version to mitigate risks.

Conclusion

The heap-use-after-free vulnerability in QuickJS poses significant risks to applications utilizing this JavaScript engine. It is crucial for developers to update to the patched version to safeguard their applications against potential exploitation. Utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for quickjs →

Share this vulnerability

FAQ

A heap-use-after-free vulnerability occurs when a program continues to use memory after it has been freed, which can lead to crashes or exploitation by attackers.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By utilizing the Vulert playground, you can check if your application is affected without any signup.

Exploitation of this vulnerability can lead to application crashes, data corruption, or even arbitrary code execution, compromising the security of the application.

Yes, users should update to the version fixed in commit 11d076fac6691da27df021872cdb12ec44d022e6 to ensure they are not affected by this vulnerability.

If an immediate update is not possible, consider isolating the application from untrusted inputs and monitoring for unusual behavior until the update can be applied.

Related vulnerabilities

Recent vulnerabilities recorded for quickjs.

How To Fix

Minimum fixed version

11d076fac6691da27df021872cdb12ec44d022e6

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