字号·· | 护眼
漏洞档案 · 严重

Apache Log4j2 JNDI 注入远程代码执行(CVE-2021-44228)

CVE-2021-44228 别名:GHSA-JFH8-C2JP-5V3Q
CVSS 10.0 / 3.1 EPSS 100.0% CISA KEV 在野利用 勒索软件利用 公开 PoC · 182 Nuclei 模板
综合风险100/ 100
CVSS10.0严重
EPSS100.0%30 天利用概率
机构收录时间2021-12-06更新 2026-12-01

研判简报

概述

Log4j2 的 JNDI 特性在配置、日志消息与日志参数中未对攻击者可控的 LDAP 等 JNDI 端点做防护。当消息 lookup 替换开启时,能控制日志内容或参数的人即可从远程 LDAP 服务器加载并执行任意代码。该问题仅影响 log4j-core,不影响 log4net、log4cxx 等其他 Apache Logging Services 项目。因日志写入点极广、利用门槛低,任何在 Java 应用中内嵌 Log4j2 的部门都应立即确认资产状态。

严重性

CVSS 3.1 评分 10.0(AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H),综合风险分 100.0/100,评级 critical。EPSS 30 天利用概率 100.0%(百分位 100.0%)。攻击面为任何会记录不可信输入、且 lookup 替换生效的面向公网或内网应用;CISA SSVC 判定 automatable=yes、exploitation=active、technical_impact=total。

利用状态

截至核查日期 2026-11-24:CISA KEV 已收录(2021-12-10),已知被勒索软件利用;公开 Exploit-DB/PoC 记录 182 条;存在公开 Nuclei 检测模板 http/cves/2021/CVE-2021-44228.yaml(oast 外带式,覆盖 Header、Cookie、URI 等注入点)。KEV 要求动作的期限为 2021-12-24,即对存在更新的资产只能“打补丁”或“移出网络”,临时缓解仅在更新可用前可接受。

受影响产品

Apache Log4j2 2.0-beta9 至 2.15.0(不含安全版本 2.12.2、2.12.3、2.3.1);受影响组件为 log4j-core。部署形态材料未给出,需自行按依赖坐标清点(含间接依赖、 shaded/打包进 fat-jar 的情况)。注意:参考材料中的 Nuclei 模板描述写作 “<=2.14.1”,与官方区间(上限到 2.15.0)存在出入,以官方记录为准。

修复版本

官方给出的修复版本:2.15.0(该版本起默认禁用该行为)、2.16.0(连同 2.12.2、2.12.3、2.3.1,该功能被彻底移除)。结构化提取的修复版本为 2.3.1、2.12.2、2.15.0。参考材料中 Nuclei 模板建议升级到 2.3.1(Java 6)、2.12.3(Java 7)、2.17.0(Java 8 及以上),与官方结构化字段不完全一致,以官方安全页为准。

缓解措施

材料指向 CISA 的 Log4j 推荐缓解措施页面(https://www.cisa.gov/uscert/ed-22-02-apache-log4j-recommended-mitigation-measures),具体措施条目材料未给出。CISA KEV 明确:临时缓解仅在更新可用前可接受;更新存在时应打补丁或将资产移出网络。官方安全页强调配置属运营方受信资源,须限制非受信方写入,并注意上下文 map 中可能含 HTTP 头等用户输入。

响应步骤

  1. 清点所有 Java 应用与镜像中的 log4j-core 依赖及版本,含传递依赖与打包产物。
  2. 对落在受影响区间的资产,按官方修复版本升级(优先 2.16.0 及以上,或对应 2.12.x/2.3.x 安全版本)。
  3. 短期无法升级的,按 CISA 缓解页面处置,并记录例外与到期时间。
  4. 排查历史日志与出网流量中的 ${jndi: 特征及异常 LDAP/RMI 外连,评估是否已被利用。
  5. 用公开 Nuclei 模板或 OAST 手段对暴露面做验证性检测,勿在生产盲扫。
  6. 将该资产纳入 KEV 跟踪,确认已满足“更新或下线”要求后再关闭工单。

参考来源

  1. https://nvd.nist.gov/vuln/detail/CVE-2021-44228kev
  2. https://www.exploit-db.com/exploits/51183exploit,exploitdb
  3. https://www.exploit-db.com/exploits/50592exploit,exploitdb
  4. https://www.exploit-db.com/exploits/50590exploit,exploitdb
  5. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-44228.yamlexploit,nuclei
  6. https://logging.apache.org/log4j/2.x/security.htmlx_transferred,advisory,euvd
  7. http://www.openwall.com/lists/oss-security/2021/12/10/1mailing-list,mailing-list,x_transferred,advisory,euvd
  8. http://www.openwall.com/lists/oss-security/2021/12/10/2mailing-list,mailing-list,x_transferred,advisory,euvd
  9. https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbdvendor-advisory,vendor-advisory,x_transferred,advisory,euvd
  10. http://www.openwall.com/lists/oss-security/2021/12/10/3mailing-list,mailing-list,x_transferred,advisory,euvd
  11. https://security.netapp.com/advisory/ntap-20211210-0007/x_transferred,advisory,euvd
  12. http://packetstormsecurity.com/files/165225/Apache-Log4j2-2.14.1-Remote-Code-Execution.htmlx_transferred,advisory,euvd
  13. https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032x_transferred,advisory,euvd
  14. https://www.oracle.com/security-alerts/alert-cve-2021-44228.htmlx_transferred,advisory,euvd
  15. https://www.debian.org/security/2021/dsa-5020vendor-advisory,vendor-advisory,x_transferred,advisory,euvd
  16. https://lists.debian.org/debian-lts-announce/2021/12/msg00007.htmlmailing-list,mailing-list,x_transferred,advisory,euvd