Cloudanix VulnDB

CVE-2021-44994

Medium · 5.5

CVSS

5.5

EPSS

1.0%

Published

Jan 25, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a JavaScript processing tool can make apps using it crash unexpectedly from bad input.

Exploit Available
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

Triggers an assertion failure in the memory heap management of the Jerryscript JavaScript engine, causing the process to terminate.

Why it matters to the business

Leads to unexpected crashes in applications relying on Jerryscript, disrupting services especially in resource-constrained environments like IoT devices.

How an attack unfolds

An attacker supplies specially crafted JavaScript input to the engine that violates the heap allocation invariant, triggering the failed assertion and crashing the application.

How to fix it

No fixed versions listed; monitor for updates to Jerryscript or apply patches to remove or handle the assertion gracefully.

How to confirm the fix worked

Test with inputs that previously triggered the crash to ensure stability; check for absence of the assertion failure in logs.

Typical attack path

  1. Identify an application using the vulnerable Jerryscript version
  2. Craft malicious JavaScript code to trigger heap assertion
  3. Deliver the input to the target application
  4. Cause denial of service through crash

How to detect it

Look for application crash logs containing the assertion failure message from jmem-heap.c; monitor for unexpected terminations of processes using Jerryscript.

  • JERRY_CONTEXT (jmem_heap_allocated_size) == 0
  • /jerry-core/jmem/jmem-heap.c
  • Assertion failed

What your security team should do

  • Assess usage of Jerryscript in the environment
  • Plan for updates once available
  • Implement input validation to mitigate potential triggers
  • Monitor for crashes related to the engine

The record

There is an Assertion ''JERRY_CONTEXT (jmem_heap_allocated_size) == 0'' failed at /jerry-core/jmem/jmem-heap.c in Jerryscript 3.0.0.

Affected packages

Ecosystem Package Introduced Fixed
Ubuntu:22.04:LTS iotjs 0 No fix
conan jerryscript 3.0.0 No fix

Related vulnerabilities