Cloudanix VulnDB

CVE-2022-22891

Medium · 5.5

CVSS

5.5

EPSS

0.6%

Published

Jan 21, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a JavaScript engine can make programs that run scripts crash when they receive certain inputs.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Triggers a segmentation fault (SEGV) during garbage collection by dereferencing an invalid object in ecma_ref_object_inline, resulting in process crash.

Why it matters to the business

Causes denial of service for any applications or services relying on the vulnerable JavaScript engine when processing untrusted scripts.

How an attack unfolds

An attacker supplies specially crafted JavaScript that forces the engine into a state where the garbage collector encounters an invalid object reference, leading to immediate crash; public exploits exist and can be adapted for local or embedded use cases.

How to fix it

Upgrade JerryScript to a version that resolves the ecma_ref_object_inline handling flaw; if no upstream fix is available, apply custom patches to the garbage collector or restrict untrusted script execution.

How to confirm the fix worked

Reproduce the crash with known triggering inputs on the vulnerable build, then confirm absence of SEGV after applying updates or mitigations.

Typical attack path

  1. Deliver malicious JavaScript to the JerryScript interpreter
  2. Force execution paths that invoke garbage collection
  3. Trigger invalid object reference in ecma-gc.c
  4. Cause SEGV and application termination

How to detect it

Inspect process logs and core dumps for segmentation faults originating from ecma-gc.c or the JerryScript binary during script execution.

What your security team should do

  • Replace or upgrade all instances of JerryScript 3.0.0 and earlier
  • Sandbox or isolate script execution environments
  • Add crash monitoring and alerting for JavaScript engine processes
  • Review downstream dependents for exposure

The record

Jerryscript 3.0.0 was discovered to contain a SEGV vulnerability via ecma_ref_object_inline in /jerry-core/ecma/base/ecma-gc.c.

Affected packages

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

Related vulnerabilities