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.
High severity with no evidence of exploitation so far.
What to do
- Update cesanta/mongoose to 7.6 or a later version.
- Update Mongoose to 7.6 or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Cesanta/mongoose | cesanta/mongoose | before 7.6 | 7.6 |
| Cesanta | Mongoose | before 7.6 | 7.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 system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 9.8 | Critical | CNA (snyk.io) |
| CVSS 3.1 | 7.5 | High | NVD |
| CVSS 2.0 | 5.0 | Medium | NVD |
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
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945Third Party Advisory
Technical write-ups (may include proof of concept)
- snyk.io/vuln/SNYK-UNMANAGED-CESANTAMONGOOSE-2404180Exploit, Third Party Advisory
Recent Files or Directories Accessible to External Parties vulnerabilities
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
Apache Flink Improper Access Control Exploited
- 7.8 High severity
Roundcube Webmail File Disclosure Exploited
- 5.5 Medium severity
ImageMagick Arbitrary File Deletion Exploited
Spotted an error? Tell us.