平台
nodejs
组件
dns-packet
修复版本
5.2.2
5.2.2
CVE-2021-23386是dns-packet包中存在的一个内存泄露漏洞。该漏洞源于程序在使用allocUnsafe创建缓冲区时,并非总是在形成网络数据包之前填充它们,导致在查询精心构造的无效域名时,可能通过未加密的网络暴露内部应用程序内存,从而泄露敏感信息。受影响的版本包括dns-packet 1.3.2之前和5.2.2之前的版本。此问题已在5.2.2版本中修复。
CVE-2021-23386 影响 dns-packet 包的 1.3.2 之前的版本和 5.2.2 之前的版本,存在敏感内存泄露的风险。问题在于该包处理缓冲区分配和填充的方式。具体来说,它使用 allocUnsafe 创建缓冲区,而没有确保在构建网络包之前缓冲区已完全填充。这使得攻击者可以通过发送专门设计的无效域名,导致应用程序的内部内存片段包含在通过网络传输的网络包中。这些信息可能包括 API 密钥、密码或其他敏感数据,从而可能危及系统安全。
利用此漏洞需要攻击者能够将 DNS 查询发送到受影响的系统。这可以通过多种方式实现,例如将恶意 DNS 流量直接发送到系统或利用受损的 DNS 服务器。攻击者必须发送精心设计的域名,以触发缓冲区溢出条件。利用的复杂性取决于网络配置和现有的安全措施。网络中缺乏加密会加剧风险,因为暴露的信息以明文形式传输。
Applications utilizing the dns-packet package in Node.js environments are at risk, particularly those handling external DNS queries or processing user-supplied domain names. This includes applications that rely on DNS resolution for functionality, such as DNS resolvers, network monitoring tools, and applications integrating with DNS services. Shared hosting environments where multiple applications share the same Node.js instance are also at increased risk.
• nodejs / server:
npm list dns-packetIf the output shows a version prior to 5.2.2, the system is vulnerable. • nodejs / server:
npm audit dns-packetThis command will identify the vulnerability and suggest an upgrade. • generic web: Monitor network traffic for unusual DNS queries containing invalid or malformed domain names. Look for patterns indicative of probing or exploitation attempts.
disclosure
漏洞利用状态
EPSS
1.11% (78% 百分位)
CVSS 向量
针对 CVE-2021-23386 的建议缓解措施是将 dns-packet 包更新到 5.2.2 或更高版本。此版本包含修复程序,通过确保在用于构建网络包之前缓冲区已正确填充,从而解决了漏洞。如果无法立即更新,请考虑实施其他安全措施,例如网络隔离和监控网络流量以查找可疑模式。 审查项目依赖项并更新任何使用 dns-packet 漏洞版本的其他库也很重要。 及时应用安全补丁对于保护系统免受潜在攻击至关重要。
Actualice el paquete dns-packet a la versión 5.2.2 o superior. Esto corrige la vulnerabilidad de exposición de memoria al asegurar que los buffers se llenen correctamente antes de formar paquetes de red. Ejecute `npm install dns-packet@latest` para actualizar.
漏洞分析和关键警报直接发送到您的邮箱。
这是一个快速分配内存的函数,但没有进行广泛的安全检查,这可能导致缓冲区溢出等错误。
检查您使用的 dns-packet 包的版本。如果版本早于 1.3.2 或 5.2.2,则容易受到攻击。
实施网络隔离并监控网络流量以查找可疑模式。
API 密钥、密码以及存储在应用程序内存中的其他敏感数据。
进行彻底的测试,以确保更新没有引入任何新问题。