pbojinov / request-ip

A Node.js module for retrieving a request's IP address on the server.
https://npmjs.com/package/request-ip
MIT License
828 stars 102 forks source link

Note vulnerability to spoofing in README #91

Open YSaxon opened 11 months ago

YSaxon commented 11 months ago

Vulnerabilities related to IP spoofing have been known since 2017, but have never been fixed. Admittedly, fixing them would be difficult or impossible without radically altering the library and getting many complaints, which is why the one fix that was ever attempted was quickly reverted.

This library has many valid use cases, but it should be made clear that security is not one of them. Here is a draft of such a security warning. Feel free to suggest any edits.

See https://github.com/pbojinov/request-ip/issues/25#issuecomment-1819674645, and https://github.com/pbojinov/request-ip/issues/26