Habr•November 2, 2026•🇷🇺Translated from Russian

Docker Bypasses UFW Firewall Exposing PostgreSQL and Redis Ports to Rapid Malware Infections

A typical migration to a fresh VPS begins with basic hardening on Ubuntu or Debian using UFW with default deny incoming and only ports 22, 80, and 443 allowed. After confirming UFW status shows no unexpected listeners, Docker is installed and a compose file launches backend services including PostgreSQL and Redis with explicit port mappings such as "5432:5432" for convenient remote access via tools like DBeaver.

Within days, abuse reports arrive from the hosting provider or monitoring alerts trigger as CPU usage spikes from processes like kdevtmpfsi or kinsing, while database tables are replaced by ransom notes demanding Bitcoin. The root cause lies in how Docker manipulates Netfilter tables, bypassing UFW entirely.

Netfilter Bypass Mechanism

Docker enables IP forwarding and creates bridge interfaces such as docker0 and br-xxxx for each compose stack. It inserts DNAT rules into the nat PREROUTING chain that rewrite destination addresses from the host's public IP to internal container IPs like 172.18.0.2 before routing decisions occur. Traffic then enters the FORWARD chain where Docker's DOCKER-FORWARD and DOCKER chains appear above UFW's ufw-before-forward rules, granting ACCEPT for the mapped ports.

Testing with netcat from an external machine confirms both 5432 and 6379 respond despite UFW verbose status showing only SSH and web ports allowed. The ss command reveals docker-proxy listening on 0.0.0.0 and [::] for these ports.

IPv6 Exposure Risks

Starting with Docker 27.0, ip6tables management activates by default. Administrators who configure protections only in IPv4 tables or set IPV6=no in ufw defaults leave IPv6 sockets open. Hetzner and similar providers assign public /64 prefixes, allowing scanners to reach [::]:5432 even when IPv4 is blocked.

Bot Activity Timeline and Techniques

Cloud IP ranges are continuously scanned by masscan and zmap for database ports. In one documented case on a Hetzner CPX21 instance running Qdrant, Redis, and PostgreSQL, the first REPLICAOF connection arrived 1 minute 52 seconds after container startup.

  • For Redis without authentication, bots issue FLUSHALL then attempt CONFIG SET to write cron jobs or load malicious modules via replication.
  • Older images remain vulnerable to CVE-2022-0543 Lua escapes on Debian-based builds.
  • PostgreSQL instances with weak default credentials such as postgres:password123 are directly accessible for data exfiltration or ransomware deployment.

Similar incidents affected Spree Commerce starter templates where maintainers noted the configuration was intended only for local development.

Related articles

Habr•Vulnerabilities & Exploits

11-Year-Old Linux Kernel Race Condition NoisyTCP (CVE-2026-99288) Enables Remote DoS on Nginx, Apache and SSH Servers

Security researcher Hyunwoo Kim disclosed NoisyTCP (CVE-2026-99288), an 11-year-old race condition in the Linux kernel networking stack that allows unauthenticated remote attackers to trigger kernel panics and crash servers. The flaw stems from concurrent access to the ehash table during TCP socket lookup, where one CPU context may dereference a freed request_sock or full socket while another reuses the memory via SYN cookies. Exploitation requires multiple RX queues or RPS enabled and succeeds reliably on virtualized environments within seconds to minutes. Affected systems include nearly all distributions running kernels from 4.4 onward until the fix landed in November 2026. Temporary mitigations involve disabling SYN cookies or restricting traffic to a single RX queue, though both reduce resilience or performance. The researcher published full technical details on GitHub after coordinated disclosure.

BoletimSec•Vulnerabilities & Exploits

Check Point Gateways Hit by PHP2Shell Exploits Installing TSGA Backdoor via Chained CVEs

An unidentified threat actor has been actively exploiting known vulnerabilities in unpatched Check Point Security Gateways to deploy the TSGA backdoor. The campaign began on 30 October 2026 against Israeli organizations and expanded on 2 November to targets across multiple countries and industries. Initial access leveraged CVE-2026-109618 and CVE-2026-109619 in exposed Mobile Access portals, followed by local privilege escalation through the previously unknown CVE-2026-123039 in Gaia OS. Attackers then installed PHP web shells and the TSGA backdoor, which provides encrypted remote access, configuration theft, persistence mechanisms, and log tampering via the embedded TSProxy component. In the first wave, operators pivoted to VMware ESXi hosts and deployed the destructive wiper destroy_v6. While tooling overlaps with the China-linked Armory Castle group’s PhiliKit framework, the use of a wiper and references to the Israel-Palestine conflict leave attribution open to three scenarios.

Security NEXT•Vulnerabilities & Exploits

Apache Shiro Authentication Bypass Vulnerability Disclosed, Fixed in August Update

A critical authentication bypass vulnerability has been identified in the Java security framework Apache Shiro under specific LDAP caching configurations. The flaw, tracked as CVE-2026-129349, affects versions prior to 3.0.0 and carries a CVSSv4.0 base score of 9.1, rated Critical. Once a valid user authenticates successfully, subsequent login attempts using the cache accept any password for that username, enabling impersonation attacks. The Apache Shiro development team disclosed the issue on November 14, 2026, noting that the vulnerability was already resolved in version 3.0.1 released in August 2026. Version 3.0.2 was made available on November 8, 2026, and users are urged to upgrade immediately to the latest release.

Security NEXT•Vulnerabilities & Exploits

Check Point Products Affected by Privilege Escalation Flaw CVE-2026-123039 Exploited in PHP2Shell Attacks

Check Point Software Technologies has disclosed a high-severity privilege escalation vulnerability in its security products that can allow attackers to obtain root privileges. The flaw, tracked as CVE-2026-123039, resides in the DynamicCLI component of Gaia OS, the operating system used by security gateways and management servers. With a CVSS base score of 7.8, the issue enables local code execution to be escalated to full root access and arbitrary command execution. Check Point confirmed that the vulnerability has already been exploited in the wild, specifically in attacks that first compromised the Mobile Access Portal using the PHP2Shell flaw and then chained to CVE-2026-123039. The company published the advisory on November 12, 2026, urging customers to apply available patches immediately to prevent further compromise of network security infrastructure.