MongooseApplication · Cesanta

CVE-2024-42383

CRITICAL · 9.8 CVSS v3.1 Published 2024-11-18
Fix available
A fix is available. Upgrade to after 7.14 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Use of Out-of-range Pointer Offset vulnerability in Cesanta Mongoose Web Server v7.14 allows to write a NULL byte value beyond the memory space dedicated for the hostname field.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

Cesanta Mongoose Web Server v7.14 contains an out-of-range pointer offset vulnerability in hostname field handling that allows writing a NULL byte beyond the allocated memory buffer. This out-of-bounds write can lead to memory corruption and potentially enable code execution.

MitigationUpdate to a patched version of Mongoose Web Server if available, or implement proper bounds checking on hostname input before memory allocation/writing to prevent the out-of-bounds NULL byte write.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
MongooseApplication
Affected:<= 7.14

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify the installed Mongoose Web Server version
    Check your application or library binary/package for version information. Common methods: 'mongoose -v' command line, check library file version metadata, or review your dependency manifest (package.json, go.mod, requirements.txt, etc.) for the mongoose version
    Affected if The installed version is 7.14 or any lower version (<= 7.14)
  2. Confirm Mongoose HTTP server is in use
    Inspect your application's code to verify it initializes and runs the Mongoose HTTP server (mg_http_listen, mg_bind, or similar API calls)
    Affected if Your application starts an HTTP server using Mongoose library functions
  3. Verify hostname handling is enabled
    Check if your server configuration or code accepts and processes HTTP Host headers or performs hostname-based routing/vhosting. Look for mg_http_server_req_by_mask, mg_http_parse_header, or similar hostname-related parsing code
    Affected if The server processes Host headers or performs any hostname-based request handling
  4. Inspect memory allocation for hostname buffers
    If you have access to source code, locate the mg_http_parse_header or mg_get_http_header_value function calls that handle hostname data. Verify the buffer allocation accounts for the NULL terminator (should be hostname_length + 1)
    Affected if The code allocates a buffer sized exactly to hostname length without extra byte for NULL terminator, or uses unsafe pointer arithmetic when copying hostname data
  5. Review runtime behavior with hostname input
    If possible, send HTTP requests with unusually long Host header values to observe if the server exhibits unexpected behavior or crashes (out-of-bounds write may cause intermittent crashes)
    Affected if Server crashes or exhibits undefined behavior when processing Host headers with boundary-length values

You are affected if you are running Cesanta Mongoose Web Server version 7.14 or lower AND your server processes HTTP Host headers, as the vulnerability triggers during hostname field handling.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to a release after 7.14
Interim mitigation

Update to a patched version of Mongoose Web Server if available, or implement proper bounds checking on hostname input before memory allocation/writing to prevent the out-of-bounds NULL byte write.

Recommended fix Moderate confidence

Mongoose version > 7.14 (e.g., 7.15 or latest stable release)

  1. 1. Identify all applications and services using the Mongoose library version 7.14 or earlier
  2. 2. Check the current Mongoose version in use by examining package.json, requirements, or dependency lock files
  3. 3. Update Mongoose to the latest stable version available from the official Cesanta repository or package manager
  4. 4. Verify the upgrade by checking that the new version is greater than 7.14 (e.g., 7.15 or later)
  5. 5. Rebuild and redeploy all affected applications with the updated dependency
  6. 6. Test the hostname handling functionality to ensure normal operation after the upgrade
Caveat Review the Mongoose changelog between 7.14 and the target version for any API changes or breaking changes that may affect your implementation

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Mongoose Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing5.0 h
  • Review / QA3.0 h
17.0 hours of engineering $2,970
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,752.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-42383 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-42383 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data