CVE-2023-26158
JavaScript vulnerability analysis and mitigation

Overview

All versions of the package mockjs are vulnerable to Prototype Pollution via the Util.extend function due to missing check if the attribute resolves to the object prototype. The vulnerability was disclosed on November 7, 2023, and published on December 8, 2023 (NVD, Snyk).

Technical details

The vulnerability exists in the Util.extend function where user-controlled inputs inside the extend() method of the Mock.Handler, Mock.Random, Mock.RE.Handler, or Mock.Util can be exploited. The issue stems from improper input sanitization that allows the usage of dangerous attributes like 'proto', 'constructor', and 'prototype' (Snyk).

Impact

By adding or modifying attributes of an object prototype, attackers can create attributes that exist on every object or replace critical attributes with malicious ones. This can be problematic if the software depends on the existence or non-existence of certain attributes, or uses pre-defined attributes of object prototype such as hasOwnProperty, toString, or valueOf (Snyk).

Mitigation and workarounds

As there is no fixed version available, a workaround has been provided that involves using a denylist of dangerous attributes. The recommended solution is to add a check in the Util.extend function that prevents the use of 'proto', 'constructor', and 'prototype' attributes (Snyk).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23947CRITICAL9.3
  • JavaScriptJavaScript
  • @orval/core
NoYesJan 20, 2026
CVE-2026-23950HIGH8.8
  • JavaScriptJavaScript
  • grafana-graphite
NoYesJan 20, 2026
CVE-2026-22037HIGH8.4
  • JavaScriptJavaScript
  • @fastify/express
NoYesJan 19, 2026
CVE-2026-23522LOW3.7
  • JavaScriptJavaScript
  • @lobehub/chat
NoNoJan 19, 2026
CVE-2025-66803LOW1.7
  • JavaScriptJavaScript
  • @hotwired/turbo
NoYesJan 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management