GHSA-h7m9-764r-7x4x: Mongoose: Path traversal in SSI #include directives enables arbitrary file read
Mongoose is an embedded web server and network library. Prior to 7.22, an attacker who can control an SSI-enabled file can place directory traversal sequences in an #include file or #include virtual directive. The mgssi() function in src/ssi.c concatenates the directive argument into a filesystem path without calling mgpathissane(), allowing an MGENABLESSI deployment with ssipattern configured to disclose files readable by the Mongoose process. This issue is fixed in version 7.22.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Mongooseto a version that resolves this vulnerability.Fixed in 7.22