CVE-2023-41877

7.2 HIGH

📋 TL;DR

This CVE describes a path traversal vulnerability in GeoServer that allows administrators with access to the admin console to misconfigure log file locations to arbitrary paths, then view the contents of those files through the GeoServer Logs page. It affects GeoServer versions 2.23.4 and prior. The vulnerability requires administrative access, so it primarily impacts organizations where GeoServer administrators could be compromised or malicious.

💻 Affected Systems

Products:
  • GeoServer
Versions: 2.23.4 and prior
Operating Systems: All platforms running Java
Default Config Vulnerable: ⚠️ Yes
Notes: Requires GeoServer administrator access to the admin console. The vulnerability exists in the Global Settings configuration interface.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

A compromised or malicious administrator could read sensitive system files (including configuration files, credentials, or other sensitive data) from the server filesystem, potentially leading to full system compromise.

🟠

Likely Case

An administrator with legitimate access could accidentally or intentionally read files they shouldn't have access to, violating data confidentiality policies.

🟢

If Mitigated

With proper access controls and monitoring, the impact is limited to authorized administrators who are already trusted with significant system access.

🌐 Internet-Facing: MEDIUM - While exploitation requires admin credentials, internet-facing GeoServer instances increase the attack surface for credential compromise.
🏢 Internal Only: MEDIUM - Internal administrators already have significant access, but this vulnerability could enable privilege escalation or lateral movement within the environment.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW - Requires admin credentials but the path traversal is straightforward once authenticated.

Exploitation requires administrative access to GeoServer, which typically represents a trusted party. No public exploit code has been identified.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: None available as of publication

Vendor Advisory: https://github.com/geoserver/geoserver/security/advisories/GHSA-8g7v-vjrc-x4g5

Restart Required: No

Instructions:

No official patch is available. Apply workarounds or upgrade to a future version when a fix is released.

🔧 Temporary Workarounds

Set GEOSERVER_LOG_LOCATION via system property

all

Override the log location configuration using system properties to prevent administrators from changing it via the web interface.

java -DGEOSERVER_LOG_LOCATION=/secure/path/geoserver.log -jar geoserver.war

Set GEOSERVER_LOG_LOCATION via environment variable

linux

Set the log location as an environment variable to override web interface configuration.

export GEOSERVER_LOG_LOCATION=/secure/path/geoserver.log

Set GEOSERVER_LOG_LOCATION via servlet context

all

Configure the log location in the servlet context parameters of your application server.

🧯 If You Can't Patch

  • Restrict administrative access to GeoServer to only trusted personnel with minimal necessary privileges.
  • Implement file system permissions to limit what files GeoServer and its administrators can access.

🔍 How to Verify

Check if Vulnerable:

Check GeoServer version: if version is 2.23.4 or earlier, the system is vulnerable. Verify if administrators can modify log file location in Global Settings.

Check Version:

Check the GeoServer version in the admin console under About & Status, or examine the geoserver.log file for version information.

Verify Fix Applied:

Verify that GEOSERVER_LOG_LOCATION is set via system property, environment variable, or servlet context parameter and cannot be overridden via the admin console.

📡 Detection & Monitoring

Log Indicators:

  • Unusual log file path configurations in GeoServer logs
  • Administrative actions modifying Global Settings log location

Network Indicators:

  • HTTP requests to /geoserver/web/admin/globalSettings with log location parameters

SIEM Query:

source="geoserver.log" AND ("log.location" OR "Global Settings" AND "log")

🔗 References

📤 Share & Export