GHSA-WF6J-GR27-G7CH

Vulnerability from github – Published: 2026-08-19 19:31 – Updated: 2026-08-19 19:31
VLAI
Summary
GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates
Details

Summary

A server-side template injection (SSTI) vulnerability exist that allows an authenticated administrator to upload FreeMarker templates containing malicious content that can execute OS commands and read from or write to arbitrary files on the server. These FreeMarker templates are used in a plain GeoServer instance (no extension or community modules) for WMS GetFeatureInfo HTML and JSON and WMS GetMap KML and GeoRSS output formats.

Details

The org.geoserver.template.TemplateUtils.getSafeConfiguration() method attempts to block access to the class freemarker.template.utility.Execute but it is still possible to gain access to it and other sensitive functionality by chaining a specific sequence of method calls.

Impact

This vulnerability can lead to executing arbitrary code and reading and writing arbitrary files.

Resolution

GeoServer 2.27.0 addresses this vulnerability with several new application properties:

  • GEOSERVER_FREEMARKER_BLOCK_LIST
  • GEOSERVER_FREEMARKER_ALLOW_LIST
  • GEOSERVER_FREEMARKER_API_EXPOSED

These application properties default to restricting the objects template authors can access, and limit access to "getter" methods used to access object properties.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.geoserver:gs-main"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.27.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.geoserver:gs-wms"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.27.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.geoserver.web:gs-web-app"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.27.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-45747"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-749"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-19T19:31:54Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Summary\nA server-side template injection (SSTI) vulnerability exist that allows an authenticated administrator to upload FreeMarker templates containing malicious content that can execute OS commands and read from or write to arbitrary files on the server. These FreeMarker templates are used in a plain GeoServer instance (no extension or community modules) for WMS GetFeatureInfo HTML and JSON and WMS GetMap KML and GeoRSS output formats.\n\n### Details\nThe org.geoserver.template.TemplateUtils.getSafeConfiguration() method attempts to block access to the class freemarker.template.utility.Execute but it is still possible to gain access to it and other sensitive functionality by chaining a specific sequence of method calls.\n\n### Impact\nThis vulnerability can lead to executing arbitrary code and reading and writing arbitrary files.\n\n### Resolution\nGeoServer 2.27.0 addresses this vulnerability with several new application properties:\n\n* ``GEOSERVER_FREEMARKER_BLOCK_LIST``\n* ``GEOSERVER_FREEMARKER_ALLOW_LIST``\n* ``GEOSERVER_FREEMARKER_API_EXPOSED``\n\nThese application properties default to restricting the objects template authors can access, and limit access to \"getter\" methods used to access object properties.",
  "id": "GHSA-wf6j-gr27-g7ch",
  "modified": "2026-08-19T19:31:54Z",
  "published": "2026-08-19T19:31:54Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/geoserver/geoserver/security/advisories/GHSA-wf6j-gr27-g7ch"
    },
    {
      "type": "WEB",
      "url": "https://github.com/geoserver/geoserver/pull/8164"
    },
    {
      "type": "WEB",
      "url": "https://docs.geoserver.org/latest/en/user/tutorials/GetFeatureInfo/html/#accessing-instance-methods"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/geoserver/geoserver"
    },
    {
      "type": "WEB",
      "url": "https://osgeo-org.atlassian.net/browse/GEOS-11645"
    },
    {
      "type": "WEB",
      "url": "https://osgeo-org.atlassian.net/browse/GEOS-11777"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…