CVE-2021-46322
Medium · 5.5CVSS
5.5
EPSS
0.7%
Published
Jan 20, 2022
CISA due date
—
Cloudanix analysis
A bug in a JavaScript engine can make any program that uses it suddenly stop working when it receives certain data.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability triggers a segmentation fault in the duk_push_tval function of the Duktape JavaScript engine stack, causing the hosting process to crash.
Why it matters to the business
Applications embedding the affected Duktape version experience abrupt crashes and service interruptions when processing certain inputs, resulting in operational downtime and potential loss of availability.
How an attack unfolds
An attacker supplies crafted JavaScript content that reaches the vulnerable duk_push_tval call; because a public exploit is available, the input can be delivered through any interface that executes untrusted scripts in the engine, immediately terminating the process.
How to fix it
Replace the vulnerable Duktape library with a later release once a fix is published by the project maintainers; until then, restrict execution of untrusted scripts and add defensive input validation around stack operations.
How to confirm the fix worked
Re-run applications against known triggering inputs after any library update and confirm absence of segmentation faults; inspect build configurations to verify the corrected duk_api_stack.c implementation is in use.
Typical attack path
- Locate an application or service that embeds the vulnerable Duktape version
- Craft or obtain JavaScript input that exercises duk_push_tval with invalid tval data
- Deliver the input through an exposed script-execution interface
- Trigger the SEGV to crash the target process
How to detect it
Review application and system logs for segmentation fault entries that reference duktape or duk_api_stack.c; correlate crash timestamps with inbound script or data-processing events.
What your security team should do
- Inventory all products and services that embed Duktape
- Prioritize upgrade or removal of the library once a fixed release appears
- Add crash-monitoring alerts for processes linked against duktape
- Limit exposure by sandboxing or disabling script execution where feasible
The record
Duktape v2.99.99 was discovered to contain a SEGV vulnerability via the component duk_push_tval in duktape/duk_api_stack.c.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | duktape | 0 | 2.3.0-1+deb10u1 |
| Debian:11 | duktape | 0 | 2.5.0-2+deb11u1 |
| Debian:12 | duktape | 0 | 2.7.0-1 |
| Debian:13 | duktape | 0 | 2.7.0-1 |
| Ubuntu:14.04:LTS | mysql-5.5 | 0 | No fix |
| Ubuntu:16.04:LTS | mariadb-10.0 | 0 | No fix |
| Ubuntu:16.04:LTS | percona-server-5.6 | 0 | No fix |
| Ubuntu:16.04:LTS | percona-xtradb-cluster-5.6 | 0 | No fix |
| Ubuntu:18.04:LTS | duktape | 0 | No fix |
| Ubuntu:18.04:LTS | mariadb-10.1 | 0 | No fix |
| Ubuntu:20.04:LTS | duktape | 0 | No fix |
| Ubuntu:20.04:LTS | mariadb-10.3 | 0 | No fix |
| Ubuntu:22.04:LTS | duktape | 0 | 2.7.0-1 |
| Ubuntu:24.04:LTS | duktape | 0 | 2.7.0+tests-0ubuntu2 |
| Ubuntu:Pro:14.04:LTS | mysql-5.5 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | mariadb-10.0 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | percona-server-5.6 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | percona-xtradb-cluster-5.6 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | duktape | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mariadb-10.1 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | duktape | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mariadb-10.3 | 0 | No fix |
Related vulnerabilities
- CVE-2025-21555 Vulnerability in the MySQL Server product of Oracle MySQL (component: InnoDB). Also affects mysql-5.5
- CVE-2025-21559 Vulnerability in the MySQL Server product of Oracle MySQL (component: InnoDB). Also affects mysql-5.5
- CVE-2025-21540 Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: Security… Also affects mysql-5.5
- CVE-2025-21546 Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: Security… Also affects mysql-5.5
- CVE-2025-21534 Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: Performance… Also affects mysql-5.5
- CVE-2025-21536 Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: Optimizer). Also affects mysql-5.5
- CVE-2025-21525 Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: DDL). Also affects mysql-5.5
- CVE-2025-21529 Vulnerability in the MySQL Server product of Oracle MySQL (component: Server: Information… Also affects mysql-5.5