FERRAMENTAS LINUX: Tomcat Request Smuggling & 9 Other CVEs: A Permanent Fix for Linux Servers

domingo, 12 de abril de 2026

Tomcat Request Smuggling & 9 Other CVEs: A Permanent Fix for Linux Servers


 

Permanent fix for Tomcat request smuggling (CVE-2026-24880) plus 9 other CVEs. Learn how to check your version on Ubuntu, Rocky, or SUSE with real commands. Includes a bash automation script and an iptables workaround if you can't update now.


First disclosed: April 2026 (historical reference)

Affects: Any Apache Tomcat version before 9.0.117 (not just Mageia)

A single Tomcat update in April 2026 fixed 10 different vulnerabilities. The most dangerous? CVE-2026-24880request smuggling via invalid chunk extension. This lets an attacker bypass your front-end proxy and send malicious HTTP requests directly to your Tomcat backend.


Other critical fixes include:

  • CVE-2026-29146 & CVE-2026-34486 – padding oracle in EncryptInterceptor

These are not one-time issues. Any Tomcat installation older than 9.0.117 remains vulnerable today, next month, and next year.

How to check if you are vulnerable (actual commands)

Run these on your application server (not your load balancer).

bash
dpkg -l | grep tomcat9
# If version < 9.0.117 → vulnerable
# Or check manually:
/usr/share/tomcat9/bin/version.sh | grep "Server number"


bash
rpm -qa | grep tomcat
# Look for tomcat-9.0.117 or higher
# Alternative:
/usr/libexec/tomcat9/version.sh | grep "Server built"


bash
zypper info tomcat | grep Version
# Should show 9.0.117-1 or later
# Or:
rpm -q tomcat --queryformat "%{VERSION}\n"


Generic check (any Linux with Tomcat installed)

bash
find / -name "version.sh" 2>/dev/null -exec {} \; | grep "Server number"


Automation script to apply the fix (bash, major distros)


Save as fix-tomcat.sh and run as root.

bash
#!/bin/bash
# Tomcat Security Fix – CVE-2026-24880 and 9 others
# Works on Ubuntu, Rocky, SUSE

set -e

if [ "$EUID" -ne 0 ]; then
  echo "Please run as root"
  exit 1
fi

# Detect OS
if [ -f /etc/os-release ]; then
  . /etc/os-release
  OS=$ID
else
  echo "Cannot detect OS"
  exit 1
fi

echo "Updating Tomcat on $OS..."

case $OS in
  ubuntu|debian)
    apt update
    apt install -y tomcat9
    systemctl restart tomcat9
    ;;
  rocky|rhel|centos)
    dnf update -y tomcat
    systemctl restart tomcat
    ;;
  suse|opensuse-leap)
    zypper refresh
    zypper update -y tomcat
    systemctl restart tomcat
    ;;
  *)
    echo "Unsupported OS. Manual update required."
    exit 1
    ;;
esac

echo "Tomcat updated. Current version:"
/usr/share/tomcat*/bin/version.sh 2>/dev/null | grep "Server number" || \
rpm -q tomcat 2>/dev/null || dpkg -l | grep tomcat9

Make it executable: chmod +x fix-tomcat.sh && sudo ./fix-tomcat.sh

Alternative mitigation if you can't update now

Use iptables to block chunked requests with invalid extensions at the network edge. This works even with old Tomcat.

bash
# Block packets with malformed chunk extension patterns
iptables -A INPUT -p tcp --dport 8080 -m string --string "chunked" --algo kmp -j LOG --log-prefix "TOMCAT_CHUNK_"
# Then add strict proxy rules:
iptables -A INPUT -p tcp --dport 8080 -s 10.0.0.0/8 -j ACCEPT   # only internal proxies
iptables -A INPUT -p tcp --dport 8080 -j DROP

Better short-term fix: Put Apache or Nginx in front with:

apache
# In Apache virtual host
RequestReadTimeout header=5-10,MinRate=500
LimitRequestBody 10485760


And disable HTTP/1.1 chunked extensions via:

bash
echo 'org.apache.coyote.http11.Http11Protocol.COMPRESSION=off' >> /etc/tomcat/catalina.properties

But these are temporary. Update within 30 days.

Suggested reading :



Why this ebook is important ?

 The ebook Covers request smuggling, encryption interceptors, and clustering security in depth. It includes ready-to-use Ansible playbooks for all 10 CVE types above. Costs less than 1 hour of your sysadmin time.






Nenhum comentário:

Postar um comentário