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

Cacti 命令注入(CVE-2022-46169)

CVE-2022-46169
CVSS 9.8 / 3.1 EPSS 98.2% CISA KEV 在野利用 公开 PoC · 37 Nuclei 模板
综合风险93/ 100
CVSS9.8严重
EPSS98.2%30 天利用概率
机构收录时间2022-12-06更新 2026-11-29

研判简报

概述

Cacti 是一套开源运维监控与故障管理框架。其 remote_agent.php 无需认证即可访问,鉴权依赖 get_client_addr(位于 lib/functions.php)从 X-Forwarded-For、Forwarded-For 等可由攻击者任意设置的 HTTP 头中取客户端 IP,再用 gethostbyaddr 反解主机名与 poller 表比对;由于 poller 表默认存在本机条目,攻击者伪造 Forwarded-For: <TARGETIP> 即可通过校验。鉴权绕过后可触发 polldata 动作,poll_for_data 从请求参数取数据并进入命令拼接路径,从而实现任意代码执行。前提是某被监控设备已选中特定数据源;满足该前提时攻击无需任何凭据。暴露在互联网上的 Cacti 运维人员应立即关注。

严重性

CVSS 3.1 评分 9.8(AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H),严重性定为 critical;综合风险分 93.17/100。攻击面为可被外部访问的 remote_agent.php 端点,未认证远程即可触达,技术影响为 total。

利用状态

核查日期 2026-11-24:EPSS 30 天利用概率 99.8%(百分位 100.0%),已属高活跃利用级别。CISA KEV 已于 2023-02-16 收录,要求动作「Apply updates per vendor instructions.」,期限 2023-03-09。已有公开 Nuclei 检测模板(http/cves/2022/CVE-2022-46169.yaml,标签含 rce/unauth/kev),Exploit-DB/公开 PoC 计 37 条(含 exploit-db 51166)。CISA SSVC:automatable=no、exploitation=active、technical_impact=total。勒索软件关联情况:材料未给出。

受影响产品

Cacti(厂商 Cacti):cacti < 1.2.23(结构化区间记为 >=- <1.2.23),Nuclei 模板表述为「Cacti <=1.2.22」。涉及组件为 remote_agent.php 与 lib/functions.php 中的 get_client_addr。具体部署形态与受影响资产规模:材料未给出。

修复版本

官方修复版本为 Cacti 1.2.23;对应修复提交见参考链接中的 commit(7f0e163…、a8d59e8…、b43f13a…)。升级至 1.2.23 及以上即可覆盖该漏洞。

缓解措施

材料未给出厂商提供的临时缓解方案;Nuclei 模板的 remediation 仅指向升级至 1.2.23 或更高版本。以下为基于材料所载机理的推论,非厂商建议:限制外部对 remote_agent.php 的直接访问,仅允许受信 poller 网段可达;由于鉴权完全信任可伪造的 HTTP_/X-Forwarded-For 类头部,边界设备不应透传客户端可控的该类头部至 Cacti。

响应步骤

  1. 盘点现网 Cacti 实例版本,凡低于 1.2.23 者列入处置清单,优先处理互联网可达实例。
  2. 确认 remote_agent.php 是否对外暴露,收敛访问来源至受信 poller 地址。
  3. 检索 Cacti 日志中的 Unauthorized remote agent access attempt from ... 及 get_client_addr 相关 DEBUG 记录,排查异常客户端 IP 与伪造头部。
  4. 审计 remote_agent.php?action=polldata 请求,关注 poller_id、local_data_ids、host_id 参数含命令拼接或外连(curl 等)特征的可疑访问。
  5. 按 KEV 要求执行厂商修复指引,升级至 Cacti 1.2.23 或更高版本,并复核修复后端点行为。
  6. 若发现可疑执行痕迹,按主机失陷流程隔离取证并评估横向影响。

参考来源

  1. https://github.com/Cacti/cacti/security/advisories/GHSA-6p93-p743-35gfkev,x_refsource_CONFIRM,x_refsource_CONFIRM,x_transferred,advisory,euvd
  2. https://nvd.nist.gov/vuln/detail/CVE-2022-46169kev
  3. https://www.exploit-db.com/exploits/51166exploit,exploitdb
  4. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-46169.yamlexploit,nuclei
  5. https://github.com/Cacti/cacti/commit/7f0e16312dd5ce20f93744ef8b9c3b0f1ece2216x_refsource_MISC,x_refsource_MISC,x_transferred,advisory,euvd
  6. https://github.com/Cacti/cacti/commit/a8d59e8fa5f0054aa9c6981b1cbe30ef0e2a0ec9x_refsource_MISC,x_refsource_MISC,x_transferred,advisory,euvd
  7. https://github.com/Cacti/cacti/commit/b43f13ae7f1e6bfe4e8e56a80a7cd867cf2db52bx_refsource_MISC,x_refsource_MISC,x_transferred,advisory,euvd
  8. https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-46169government-resource
  9. https://github.com/rapid7/metasploit-framework/tree/master/modules/exploit_linux/http/cacti_unauthenticated_cmd_injectionexploit,metasploit
  10. https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-48996advisory,euvd
  11. https://www.linkedin.com/posts/the-shadowserver-foundation_unauthenticated-command-injection-activity-7017511524604764160-qaje/kev
  12. https://www.bleepingcomputer.com/news/security/hackers-exploit-cacti-critical-bug-to-install-malware-open-reverse-shells/kev
  13. https://euvd.enisa.europa.eu/enisa/EUVD-2022-48996kev
  14. https://www.cisa.gov/known-exploited-vulnerabilities-catalogkev
  15. https://www.fortinet.com/blog/threat-research/moobot-strikes-again-targeting-cacti-and-realtek-vulnerabilitieskev
  16. https://unit42.paloaltonetworks.com/network-security-trends-nov-jan/kev