NPM IP 包容易受到服务器端请求伪造 (SSRF) 攻击

问题描述 投票:0回答:1

github dependentabot 在我的 Angular 仓库中提醒我这个安全问题

An issue in all published versions of the NPM package ip allows an attacker to execute arbitrary code and obtain sensitive information via the isPublic() function. This can lead to potential Server-Side Request Forgery (SSRF) attacks. The core issue is the function's failure to accurately distinguish between public and private IP addresses.

更多详情:

  • 我的角度应用程序版本是14.2.0
  • 节点版本是18.15.0

我是 NodeJs 和 Angular 的新手,我还没有期待任何东西。

请帮忙:)

node.js angular github security ssrf
1个回答
0
投票

如果您的应用程序(可能直接或间接使用

ip
npm 包的部分)只是前端,那应该没问题。

如果后端使用了

ip
包,那么您的应用程序仍然很可能不会受到攻击。您可以调查您的锁定文件以查看哪些包依赖于
ip
包以及它们的使用方式。 服务器端请求伪造预防 - OWASP 备忘单系列解释了什么是 SSRF 攻击。如果使用
ip
函数来保护网络请求,则可以利用
isPublic
包漏洞。

© www.soinside.com 2019 - 2024. All rights reserved.