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.
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