提交 #804390: ggerve coding-standards-mcp c21ab2754684329eab4feb72427dc9acfe61e52f Path Traversal信息

标题ggerve coding-standards-mcp c21ab2754684329eab4feb72427dc9acfe61e52f Path Traversal
描述The server is supposed to serve Markdown templates from its bundled templates directory. Instead, both exported tools construct filenames from untrusted language input and pass them into read_template(): get_style_guide(language) builds f"{language}_style_guide.md" get_best_practices(language) builds f"{language}_best_practices.md" read_template() then does os.path.join(os.path.dirname(__file__), "templates", filename) and opens the resulting path directly. Because neither the input nor the resolved path is validated, traversal strings such as ../../../../tmp/secret escape templates/ and read files like /tmp/secret_style_guide.md.
来源⚠️ https://github.com/ggerve/coding-standards-mcp/issues/3
用户
 LargeW (UID 97302)
提交2026-04-14 13時48分 (6 月前)
管理2026-05-01 11時30分 (17 days later)
状态已接受
VulDB条目360541 [ggerve coding-standards-mcp server.py get_style_guide/get_best_practices language 目录遍历]
积分20

Do you know our Splunk app?

Download it now for free!