CVE-2022-25299
NixOS vulnerability analysis and mitigation

Overview

A directory traversal vulnerability was discovered in Mongoose, an embedded web server, affecting versions prior to 7.6. The vulnerability (CVE-2022-25299) was disclosed on February 13, 2022, and involves unsafe handling of file names during upload operations using the mg_http_upload() method (Snyk Report).

Technical details

The vulnerability exists in the mg_http_upload() function where file names during upload operations are not properly sanitized. This allows attackers to manipulate file paths using '../' sequences to write files outside the intended target directory. The issue stems from insufficient path validation before file operations (Snyk Blog).

Impact

The vulnerability enables attackers to write files to arbitrary locations outside the designated target folder on the system. This could lead to system compromise through unauthorized file writes, potentially affecting system integrity and security. The vulnerability received a CVSS score of 9.8 (Critical) due to its network attack vector, low attack complexity, and high impact on system integrity (Snyk Report).

Exploitability

The vulnerability can be exploited remotely without requiring any special privileges or user interaction. A proof of concept exploit involves using a simple curl command: curl -X POST --data "pwned" "http://localhost:8000/upload?name=../pwned" to write files outside the intended directory (Snyk Report).

Mitigation and workarounds

The vulnerability was fixed in Mongoose version 7.6 by adding path sanitization using the remove_double_dots() function to prevent directory traversal attempts. The fix ensures that file paths are properly validated before any file operations are performed (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-2026-75874CRITICAL10
  • NixOS logoNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesAug 18, 2026
CVE-2026-74990CRITICAL9.8
  • NixOS logoNixOS
  • thunderbird
NoYesAug 18, 2026
CVE-2026-74989CRITICAL9.8
  • NixOS logoNixOS
  • thunderbird
NoYesAug 18, 2026
CVE-2026-74988CRITICAL9.8
  • NixOS logoNixOS
  • thunderbird
NoYesAug 18, 2026
CVE-2026-74987CRITICAL9.8
  • NixOS logoNixOS
  • MozillaFirefox
NoYesAug 18, 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