CyberSecBulletin
CVE-2022-25299NVD status: Modified

cesanta/mongoose: Files or Directories Accessible to External Parties

CVE-2022-25299 is a high-severity files or directories accessible to external parties vulnerability in cesanta/mongoose, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version 7.6 as the first without the flaw, so updating cesanta/mongoose to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 1.39% chance of exploitation within 30 days, higher than 73% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update cesanta/mongoose to 7.6 or a later version.
  2. Update Mongoose to 7.6 or a later version.
  3. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
Cesanta/mongoosecesanta/mongoosebefore 7.67.6
CesantaMongoosebefore 7.67.6

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
NoneNo data is disclosed.
Integrity
HighData or code can be modified at will.
Availability
NoneAvailability is not affected.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.19.8CriticalCNA (snyk.io)
CVSS 3.17.5HighNVD
CVSS 2.05.0MediumNVD

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: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Files or Directories Accessible to External Parties

The product makes files or directories accessible to unauthorized actors, even though they should not be.

How developers prevent this class of flaw

  • When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to disable public access.

More Files or Directories Accessible to External Parties vulnerabilities (CWE-552)

Timeline

  1. CVE record published.
  2. Record last changed materially (score, affected products, status or references).

References

Technical write-ups (may include proof of concept)

Recent Files or Directories Accessible to External Parties vulnerabilities

Spotted an error? Tell us.