CVE-2026-73254: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in cesanta mongoose
Mongoose, an embedded web server and network library, has a stored cross-site scripting (XSS) vulnerability prior to version 7.22. An attacker able to create a file with an HTML payload in its name can cause the server to inject this payload into directory listings when MG_ENABLE_DIRLIST is enabled. This occurs because the filename is inserted raw into the HTML link text without proper neutralization, allowing browser execution of malicious markup. The vulnerability is fixed in version 7.22.
AI Analysis
Technical Summary
CVE-2026-73254 is a stored cross-site scripting vulnerability in cesanta mongoose versions before 7.22. The issue arises in the printdirentry() function called by listdir() in src/http.c, which URL-encodes the href attribute but inserts the raw filesystem filename into the HTML link text. An attacker who can create a file with an HTML payload in its name can trigger execution of this payload in the context of the Mongoose origin when a user browses a directory served with MG_ENABLE_DIRLIST enabled. This can lead to exposure of session data or unauthorized actions performed as the victim user. The vulnerability is addressed in version 7.22.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary HTML/JavaScript in the context of the Mongoose web server origin, potentially exposing session data or enabling actions on behalf of the victim user. The CVSS 3.1 base score is 5.4 (medium severity), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, unchanged scope, and low confidentiality and integrity impact with no availability impact.
Mitigation Recommendations
This vulnerability is fixed in Mongoose version 7.22. Users should upgrade to version 7.22 or later to remediate this issue. No other official remediation or temporary fixes are documented. Until upgrading, disabling the MG_ENABLE_DIRLIST option can mitigate exposure to this vulnerability by preventing directory listings that include vulnerable filename rendering.
CVE-2026-73254: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in cesanta mongoose
Description
Mongoose, an embedded web server and network library, has a stored cross-site scripting (XSS) vulnerability prior to version 7.22. An attacker able to create a file with an HTML payload in its name can cause the server to inject this payload into directory listings when MG_ENABLE_DIRLIST is enabled. This occurs because the filename is inserted raw into the HTML link text without proper neutralization, allowing browser execution of malicious markup. The vulnerability is fixed in version 7.22.
CVSS v3.1
Score 5.4medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-73254 is a stored cross-site scripting vulnerability in cesanta mongoose versions before 7.22. The issue arises in the printdirentry() function called by listdir() in src/http.c, which URL-encodes the href attribute but inserts the raw filesystem filename into the HTML link text. An attacker who can create a file with an HTML payload in its name can trigger execution of this payload in the context of the Mongoose origin when a user browses a directory served with MG_ENABLE_DIRLIST enabled. This can lead to exposure of session data or unauthorized actions performed as the victim user. The vulnerability is addressed in version 7.22.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary HTML/JavaScript in the context of the Mongoose web server origin, potentially exposing session data or enabling actions on behalf of the victim user. The CVSS 3.1 base score is 5.4 (medium severity), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, unchanged scope, and low confidentiality and integrity impact with no availability impact.
Mitigation Recommendations
This vulnerability is fixed in Mongoose version 7.22. Users should upgrade to version 7.22 or later to remediate this issue. No other official remediation or temporary fixes are documented. Until upgrading, disabling the MG_ENABLE_DIRLIST option can mitigate exposure to this vulnerability by preventing directory listings that include vulnerable filename rendering.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-11T17:18:01.598Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a873eeeacd9273b49f2b5e2
Added to database: 08/20/2026, 17:52:46 UTC
Last enriched: 08/20/2026, 18:08:19 UTC
Last updated: 08/20/2026, 18:26:19 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.