CVE-2021-46168
NixOS vulnerability analysis and mitigation

Overview

Spin v6.5.1 was discovered to contain an out-of-bounds write vulnerability in the lex() function at spinlex.c. The vulnerability was disclosed on January 10, 2022 and assigned identifier CVE-2021-46168. The issue affects the Spin model checker software version 6.5.1 (NVD, MITRE).

Technical details

The vulnerability stems from an out-of-bounds write in the lex() function within spinlex.c at line 1707. The issue occurs when processing curly braces, where the scopeseq array has a fixed size of 128 elements but the scopelevel counter can exceed this limit. When there are more than 128 opening braces '{', the scopelevel counter increases beyond the array bounds, leading to a buffer overflow. Additionally, if there are more closing braces '}' than opening ones, the scopelevel can become negative, causing writes to memory locations before the scope_seq array (GitHub Issue).

Impact

The vulnerability can lead to a segmentation fault and crash of the Spin application when processing malformed input files. This could result in denial of service conditions. Additionally, the out-of-bounds write could potentially corrupt memory and affect the integrity of the system (NVD).

Mitigation and workarounds

Users should upgrade to a version of Spin newer than 6.5.1 that contains the fix for this vulnerability. No specific workarounds were documented for users who cannot upgrade (NVD).

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-48606HIGH7.8
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48625HIGH7
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48608MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48569MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-65799MEDIUM4.3
  • NixOSNixOS
  • memos
NoYesDec 08, 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