Cloudanix VulnDB

CVE-2022-22890

Medium · 5.5

CVSS

5.5

EPSS

0.8%

Published

Jan 20, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A programming mistake in a small JavaScript engine can make any program that uses it suddenly stop working when it receives certain 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

Local assertion failure in the JavaScript scanner during argument type checks causes the Jerryscript engine to terminate.

Why it matters to the business

Applications or devices embedding Jerryscript become unavailable when processing certain untrusted scripts, leading to service disruption and potential loss of functionality in embedded or IoT environments.

How an attack unfolds

An attacker supplies a specially crafted JavaScript file or snippet to a local application using Jerryscript; the parser's scanner encounters an unexpected arguments state, triggering the hard-coded assertion and crashing the process.

How to fix it

Upgrade to a patched Jerryscript release once available; in the interim, avoid processing untrusted JavaScript and implement strict input validation or sandboxing around script loading.

How to confirm the fix worked

Reproduce the crash with the original assertion-triggering input on an unpatched build; confirm absence of the crash and presence of updated parser logic on a patched build.

Typical attack path

  1. Locate an application or device that embeds the vulnerable Jerryscript engine
  2. Craft or obtain a JavaScript input that violates the scanner's arguments-type expectations
  3. Cause the target process to parse the input (for example by opening a file or loading a script)
  4. Trigger the assertion failure to crash the engine and deny service

How to detect it

Review application and system logs for the exact assertion-failure message from js-scanner-util.c, unexpected process crashes during JavaScript parsing, and any core dumps or stack traces containing scanner argument checks.

  • arguments_type != SCANNER_ARGUMENTS_PRESENT && arguments_type != SCANNER_ARGUMENTS_PRESENT_NO_REG
  • js-scanner-util.c
  • Assertion 'arguments_type

What your security team should do

  • Inventory all systems and products that embed Jerryscript and prioritize those reachable by untrusted input
  • Apply vendor updates as soon as fixed versions are released
  • Add runtime monitoring for unexpected process terminations in Jerryscript-based components
  • Restrict execution of externally supplied scripts until patches are deployed

The record

There is an Assertion 'arguments_type != SCANNER_ARGUMENTS_PRESENT && arguments_type != SCANNER_ARGUMENTS_PRESENT_NO_REG' failed at /jerry-core/parser/js/js-scanner-util.c in Jerryscript 3.0.0.

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