machine-accessible-websites
Audited by Socket on Feb 16, 2026
1 alert found:
AnomalyThe code implements content-negotiation to serve .md files but consistently fails to validate/sanitize request path inputs before mapping them to file system paths. This introduces path traversal risks across Express, Next.js API, Fastify, Flask, and FastAPI examples allowing an attacker to request arbitrary files readable by the process. There is no evidence of obfuscation, backdoors, exfiltration, or malicious intent beyond this security bug. Recommendation: validate and canonicalize resolved file paths and ensure the final resolved path is inside the intended markdown directory (e.g., use path.resolve and compare prefixes or chroot-like checks), and reject paths containing '..' or percent-encoded traversal sequences. Apply least privilege to the process and avoid serving sensitive directories.