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

GeoServer 属性名表达式求值远程代码执行(CVE-2024-36401)

CVE-2024-36401
CVSS 9.8 / 3.1 EPSS 99.8% CISA KEV 在野利用 公开 PoC · 28 Nuclei 模板
综合风险96/ 100
CVSS9.8严重
EPSS99.8%30 天利用概率
机构收录时间2024-07-01更新 2026-12-01

研判简报

概述

GeoServer 在求值要素类型的属性/属性名时,将名称不安全地传给 commons-jxpath 作为 XPath 表达式执行,导致未认证用户可通过特制输入执行任意代码。该 XPath 求值本应仅用于复杂要素类型(Application Schema 数据存储),却被错误地应用于简单要素类型,因此影响所有 GeoServer 实例。默认安装即暴露,无需认证,危害为完全技术影响。使用 GeoServer 对外提供 WFS/WMS/WPS 服务的安全与运维人员应优先关注。

严重性

CVSS 9.8(3.1 版),综合风险分 96.16/100,评级 critical;CWE-95。攻击面为默认 GeoServer 安装的多个 OGC 请求参数,未认证远程利用。

利用状态

CISA KEV 已收录(2024-07-15),要求按厂商说明应用缓解或停用产品(期限 2024-08-05)。CISA SSVC:automatable=yes、exploitation=active、technical_impact=total。EPSS 30 天利用概率 99.8%(百分位 100.0%,日期 2026-11-23)。已有公开 Nuclei 检测模板(http/cves/2024/CVE-2024-36401.yaml)及 Exploit-DB/公开 PoC 28 条。官方通告称未提供公开 PoC,但确认可经 WFS GetFeature、WFS GetPropertyValue、WMS GetMap、WMS GetFeatureInfo、WMS GetLegendGraphic、WPS Execute 利用;此处与情报记录的「公开 PoC 28 条」存在出入,以官方记录为准并注明差异。核查日期 2026-11-24。

受影响产品

OSGeo GeoServer:>= 2.23.0, < 2.23.6;>= 2.24.0, < 2.24.4;>= 2.25.0, < 2.25.2;< 2.22.6。涉及 GeoTools 的 gt-complex 等组件;部署形态包括 geoserver.war 与二进制发行版,默认安装均受影响。

修复版本

官方修复版本:2.22.6、2.23.6、2.24.4、2.25.2(结构化提取为 2.23.6、2.24.4、2.25.2)。另可对既有安装替换三个已打补丁的 jar(gt-app-schema、gt-complex、gt-xsd-core),官方通告列出可下载补丁的版本:2.25.1、2.24.3、2.24.2、2.23.2、2.22.2、2.21.5、2.21.4、2.20.7、2.20.4、2.19.2、2.18.0。

缓解措施

删除 GeoServer 中的 gt-complex-x.y.jar(x.y 为 GeoTools 版本,如运行 2.25.1 时为 gt-complex-31.1.jar):war 部署需解包删除后重新打包,二进制部署删除 webapps/geoserver/WEB-INF/lib/ 下对应文件。该操作可能破坏部分功能或阻止部署;已知直接依赖 gt-complex 的扩展包括 Application Schema、Catalog Services for the Web、MongoDB Data Store,社区模块包括 Features-Templating、OGC API Modules、Smart Data Loader、SOLR Data Store。或按官方补丁包替换上述三个 jar(以空函数列表配置 commons-jxpath)。无法缓解时应按 KEV 要求停用产品。

响应步骤

  1. 盘点所有 GeoServer 实例与版本,确认是否落在受影响区间。
  2. 升级至 2.22.6、2.23.6、2.24.4 或 2.25.2;无法升级时按上述删除 gt-complex 或替换补丁 jar。
  3. 检查 WFS/WMS/WPS 端点是否对外暴露,收敛未认证访问面。
  4. 使用 Nuclei 模板或等效规则对暴露实例做检测,并结合日志排查异常 GetPropertyValue/GetFeature 等请求。
  5. 评估依赖 gt-complex 的扩展与模块,确认缓解后功能影响。
  6. 按 KEV 期限要求记录处置结果,持续跟踪厂商通告与利用情报更新。

参考来源

  1. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-36401.yamlexploit,nuclei
  2. https://github.com/geoserver/geoserver/security/advisories/GHSA-6jj6-gm7p-fcvvx_refsource_CONFIRM,x_refsource_CONFIRM,x_transferred,Mitigation,Vendor Advisory
  3. https://github.com/geotools/geotools/security/advisories/GHSA-w3pj-wh35-fq8wx_refsource_MISC,x_refsource_MISC,x_transferred,Exploit,Vendor Advisory
  4. https://github.com/geotools/geotools/pull/4797x_refsource_MISC,x_refsource_MISC,x_transferred,Issue Tracking,Patch
  5. https://github.com/Warxim/CVE-2022-41852?tab=readme-ov-file#workaround-for-cve-2022-41852x_refsource_MISC,x_refsource_MISC,x_transferred,Exploit,Third Party Advisory
  6. https://osgeo-org.atlassian.net/browse/GEOT-7587x_refsource_MISC,x_refsource_MISC,x_transferred,Vendor Advisory
  7. https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-36401government-resource,US Government Resource
  8. https://www.vicarius.io/vsociety/posts/geoserver-rce-cve-2024-36401Exploit,Third Party Advisory
  9. https://github.com/rapid7/metasploit-framework/tree/master/modules/exploit_multi/http/geoserver_unauth_rce_cve_2024_36401exploit,metasploit
  10. https://isc.sans.edu/feeds/urlsummary.txtkev
  11. https://euvd.enisa.europa.eu/enisa/EUVD-2024-2280kev
  12. https://www.cisa.gov/known-exploited-vulnerabilities-catalogkev
  13. https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?host_type=src&vulnerability=cve-2024-36401kev
  14. https://blog.sonicwall.com/en-us/2024/07/geoserver-rce-vulnerability-cve-2024-36401-being-exploited-in-the-wild/kev
  15. https://isc.sans.edu/diary/A%20Survey%20of%20Scans%20for%20GeoServer%20Vulnerabilities/31148kev
  16. https://www.fortinet.com/blog/threat-research/threat-actors-exploit-geoserver-vulnerability-cve-2024-36401kev