CVE-2021-33797
NixOS vulnerability analysis and mitigation

Overview

CVE-2021-33797 is a buffer overflow vulnerability affecting Artifex MuJS versions 1.0.1 to 1.1.1. The vulnerability occurs in the jsdtoa.c file when js_strtod() reads in floating point exponent, leading to an integer overflow which subsequently causes a buffer overflow in the pointer *d (NVD, CVE).

Technical details

The vulnerability stems from an integer overflow condition in the js_strtod() function when parsing floating-point exponents. When processing numbers with extremely large exponents (e.g., 1E9600000000000000000000000000), the exp variable overflows to 0x80000000, causing the subsequent for loop to execute multiple times unexpectedly. The issue is particularly problematic when compiled with GCC -O2 optimization, as it optimizes away certain overflow checks (GitHub Issue). The vulnerability has been assigned a CVSS v3.1 base score of 9.8 (CRITICAL) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability can lead to a global buffer overflow condition, potentially allowing attackers to execute arbitrary code or cause denial of service. The high CVSS score of 9.8 indicates critical severity with potential for complete system compromise (NVD).

Mitigation and workarounds

The issue has been patched by implementing additional checks to limit the exponent parsing to MAX_INT to prevent signed overflow from being affected by optimizing compilers. The fix was implemented in commit 833b6f1 (GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61619HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61618HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61617HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61610HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-65622MEDIUM5.4
  • PHPPHP
  • snipe-it
NoYesDec 01, 2025

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