file:// protocol in fetch - worth disabling by default? #25358
chefnaphtha
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
bun's
fetchsupports thefile://protocol. this is a huge security risk as in most people's mindsfetchis only for http(s), andnode:fs/Bun.file()is for filesystem.it's easy to overlook this. most people would just pass untrusted user input to
fetchthinking the worst that can happen is a network call. security-minded people might implement ssrf protection + rate limiting and think they are safe, forgetting to check the protocol.curl "http://localhost:3000/preview?url=file:///proc/self/environ"i think it's worth disabling the
file://protocol by default, maybe enable via an env var or cli argBeta Was this translation helpful? Give feedback.
All reactions