mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-16 10:39:49 +00:00
1.5 KiB
1.5 KiB
Security Scan Area: common_misc
Target
Area: common_misc
This area covers common utility code, parsing/string/formatting helpers, URL handling, hash/base64 helpers, filesystem backends, little filesystem integration, and flash support.
Primary files:
src/base64.csrc/fmt.csrc/json.csrc/log.csrc/md5.csrc/printf.csrc/sha1.csrc/sha256.csrc/str.csrc/url.csrc/util.csrc/fs*.csrc/lfs.csrc/flash.c
Perform a focused security review centered on these files and this security surface.
Supporting code elsewhere under src/ may be inspected when necessary to establish reachability, data flow, state, validation, mitigation, or impact, but do not inspect or report code outside src/ or independently review unrelated areas.
Area-Specific Security Guidance
Filesystem Backends:
- Review packed filesystem code and filesystem backends for traversal, unauthorized file read/write, overwrite, or truncation.
- Check path canonicalization across POSIX, Windows, embedded filesystems, packed filesystems, and custom
mg_fsimplementations. - Look for trailing slash confusion, NUL byte truncation, and case sensitivity differences in backend path handling.
URL Parsing:
- Review URL parsing for scheme, host, port, IPv6 literal, userinfo, percent-encoding, embedded NUL, empty host, default port, and path/query boundary confusion.
- Check for SSRF-relevant behavior only when attacker input can control the destination host, protocol, or network boundary. Path-only control is not sufficient.