CVE-2020-7069 is a security vulnerability affecting PHP versions 7.2.x prior to 7.2.34, 7.3.x prior to 7.3.23, and 7.4.x prior to 7.4.11. This flaw arises when the AES-CCM encryption mode is utilized with the openssl_encrypt() function and a 12-byte Initialization Vector (IV). Due to a defect, only the first 7 bytes of the IV are actually used, potentially compromising the integrity and confidentiality of the encrypted data. A fix is available in PHP 7.4.11.
PHP 中的 CVE-2020-7069 漏洞影响 7.2.x 小于 7.2.34、7.3.x 小于 7.3.23 和 7.4.x 小于 7.4.11 的版本。当使用 openssl_encrypt() 函数和 12 字节的 IV 与 AES-CCM 模式时,仅使用 IV 的前 7 个字节。这会损害加密数据的安全性,降低加密过程的随机性和不可预测性。攻击者可能会潜在地解密或操纵数据,尤其是在他们控制加密上下文的情况下。该漏洞源于 OpenSSL 的 AES-CCM 实现中 IV 处理中的错误。此缺陷可能导致通信和敏感数据存储的安全性显著降低。
利用此漏洞需要访问运行易受攻击 PHP 版本的系统,并使用 AES-CCM 和 12 字节 IV 的 opensslencrypt() 函数。如果攻击者能够控制或影响 IV 的内容,则他们可能会利用此漏洞。这可能发生在 Web 应用程序中,其中 IV 由用户提供的生成。成功的利用可能允许攻击者解密敏感数据、修改加密数据或执行选择明文攻击。利用的可能性取决于易受攻击 PHP 版本的普及程度以及使用 AES-CCM 的 opensslencrypt() 函数的应用程序的暴露程度。
Applications relying on PHP's openssl_encrypt() function with AES-CCM and using 12-byte IVs are at risk. This includes web applications handling sensitive data such as financial transactions, user credentials, or personal information. Shared hosting environments using vulnerable PHP versions are particularly susceptible, as they may lack the ability to quickly patch their PHP installations.
• php / server:
find /var/www/html -name "openssl_encrypt.php" -print0 | xargs -0 grep -i "openssl_encrypt\(" -B 5• php / server:
journalctl -u php7.4 -grep "AES-CCM"• php / server:
ps aux | grep -i openssl_encryptdisclosure
patch
漏洞利用状态
EPSS
8.35% (92% 百分位)
CVSS 向量
减轻 CVE-2020-7069 的解决方案是升级到包含修复程序的 PHP 版本。具体来说,升级到 PHP 7.2.34 或更高版本、PHP 7.3.23 或更高版本或 PHP 7.4.11 或更高版本。应在所有使用受影响 PHP 版本的服务器上执行升级。此外,请检查使用 AES-CCM 和 openssl_encrypt() 函数的应用程序的代码,以确保未使用 12 字节的 IV。如果必须使用 12 字节的 IV,请考虑切换到不受此问题影响的不同加密模式。升级后进行彻底的测试对于确认漏洞已解决并且应用程序正常运行至关重要。
Actualice a la última versión de PHP. Específicamente, actualice a la versión 7.2.34, 7.3.23 o 7.4.11, o superior, según la rama de PHP que esté utilizando. Esto corregirá la vulnerabilidad en la función openssl_encrypt() cuando se usa el modo AES-CCM con un IV de 12 bytes.
漏洞分析和关键警报直接发送到您的邮箱。
7.2.x 小于 7.2.34、7.3.x 小于 7.3.23 和 7.4.x 小于 7.4.11 的版本容易受到攻击。
检查您服务器上安装的 PHP 版本。您可以使用命令行中的 php -v 命令。
如果您无法立即更新 PHP,请避免使用 12 字节 IV 的 AES-CCM,或考虑切换到不同的加密模式。
在易受攻击的 PHP 版本中使用 12 字节 IV 通过 AES-CCM 加密的任何数据。
进行彻底的测试,以确认漏洞已解决并且应用程序正常运行。