BreachSpiderVerified, not vibes

CVE-2022-25299 in Cesanta Mongoose

High 7.5

This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 3.17.5
EPSS1.3%
EPSS percentile70th
FixUnknown

Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, full integrity impact, no availability impact.

Affected products and versions

VendorProductAffected versions
Cesanta Mongoose < 7.6

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official description

This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2022-25299
BreachSpider IDBS-2022-GLOBAL-070433-H
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Published2022-02-18
Last modified2024-11-21
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-552: CWE-552

Related attack patterns (CAPEC)

CAPEC-639 Probe System Files via CWE-552

CAPEC-150 Collect Data from Common Resource Locations via CWE-552

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

CVE-2022-25299 affects the cesanta/mongoose package before version 7.6, allowing attackers to write files to arbitrary locations due to unsafe handling of file names during upload.

The vulnerability is exploited through the mg_http_upload() method, which does not properly sanitize file names, enabling attackers to specify paths that lead to arbitrary file writes outside the intended directory.

Questions

What is CVE-2022-25299?

CVE-2022-25299 affects the cesanta/mongoose package before version 7.6, allowing attackers to write files to arbitrary locations due to unsafe handling of file names during upload.

What is the CVSS score for CVE-2022-25299?

CVE-2022-25299 has CVSS 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N. EPSS: 1.3%.

Is CVE-2022-25299 actively exploited?

No confirmed active exploitation of CVE-2022-25299 as of 2026-05-30.

How do I remediate CVE-2022-25299?

Priority: HIGH.

What systems are affected by CVE-2022-25299?

CVE-2022-25299 affects Cesanta Mongoose.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Cesanta","product":"Mongoose","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2024-11-21.