CVE-2023-41081

7.5 HIGH

📋 TL;DR

This vulnerability in Apache Tomcat's mod_jk connector allows attackers to bypass authentication and security constraints when specific configurations use 'JkOptions +ForwardDirectories' without explicit mounts for all proxied requests. It affects Apache Tomcat Connectors mod_jk versions 1.2.0 through 1.2.48. The issue enables unauthorized access to protected resources or exposure of status information.

💻 Affected Systems

Products:
  • Apache Tomcat Connectors (mod_jk)
Versions: 1.2.0 through 1.2.48
Operating Systems: Linux, Windows, Unix-like systems
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when using 'JkOptions +ForwardDirectories' without explicit mounts for all proxied requests. ISAPI redirector is NOT affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete authentication bypass allowing unauthorized access to sensitive backend systems, exposure of internal status information, and potential data exfiltration.

🟠

Likely Case

Unauthorized access to protected web applications, bypassing security constraints configured in Apache HTTP Server.

🟢

If Mitigated

Limited impact with proper network segmentation and additional authentication layers, though the vulnerability still exists.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires specific vulnerable configuration. No public exploit code known as of advisory date.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.2.49

Vendor Advisory: https://lists.apache.org/thread/rd1r26w7271jyqgzr4492tooyt583d8b

Restart Required: Yes

Instructions:

1. Download mod_jk 1.2.49 from Apache Tomcat website. 2. Replace existing mod_jk module. 3. Restart Apache HTTP Server. 4. Verify configuration still works correctly.

🔧 Temporary Workarounds

Remove ForwardDirectories Option

all

Remove 'JkOptions +ForwardDirectories' from mod_jk configuration to eliminate the vulnerable condition.

Edit mod_jk configuration file (e.g., /etc/httpd/conf.d/mod_jk.conf) and remove or comment out 'JkOptions +ForwardDirectories' line

Add Explicit Mounts

all

Ensure all proxied requests have explicit mount configurations defined in mod_jk configuration.

Add explicit JkMount directives for all required URL patterns in mod_jk configuration

🧯 If You Can't Patch

  • Implement network segmentation to isolate vulnerable systems from sensitive resources
  • Add additional authentication layers (WAF, reverse proxy with auth) in front of vulnerable systems

🔍 How to Verify

Check if Vulnerable:

Check mod_jk version and configuration: 1. Run 'httpd -M | grep jk' to confirm mod_jk loaded. 2. Check configuration files for 'JkOptions +ForwardDirectories'. 3. Verify version is between 1.2.0-1.2.48.

Check Version:

grep -i 'mod_jk' /path/to/httpd/modules/mod_jk.so | head -1

Verify Fix Applied:

1. Confirm mod_jk version is 1.2.49 or higher. 2. Verify 'JkOptions +ForwardDirectories' is either removed or all proxied requests have explicit mounts. 3. Test authentication bypass attempts fail.

📡 Detection & Monitoring

Log Indicators:

  • Unusual access patterns to status endpoints
  • Requests bypassing expected authentication flows
  • Access to URLs without proper mount configurations

Network Indicators:

  • HTTP requests to unexpected backend workers
  • Traffic patterns suggesting authentication bypass

SIEM Query:

source="apache_access" AND (uri="/jkstatus" OR uri="/jkmanager" OR uri CONTAINS "status") AND NOT user_agent="monitoring_tool"

🔗 References

📤 Share & Export