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
WordPress Patches Race Condition in Core Update Process Enabling Unauthenticated Remote Code Execution
WordPress addressed a critical race condition vulnerability in its core update mechanism on October 28, 2026, that could allow remote code execution without authentication. The flaw affects the automatic update process used by the majority of installations, exposing a temporary installer during file extraction to a predictable folder. Wordfence recorded 60,471 exploitation attempts within the first 24 hours after disclosure. The issue was discovered by researcher Umut Bayram and fixed across multiple branches including version 7.1.4, which bundles 22 security patches. Mitigations include immediate updates, restricting public access to the wp-content update directory, and ensuring application firewall coverage. Versions 4.6 and earlier receive no further security updates.
Google Releases November Android Security Patch Fixing 216 Vulnerabilities Including Critical Zero-Click Flaws
Google has issued its November security update for Android, addressing a total of 216 vulnerabilities with 23 classified as critical. The patch resolves multiple remote code execution flaws that require no additional privileges or user interaction, qualifying as zero-click attacks. Specific fixes include CVE-2026-58868 in the Framework component and CVE-2026-58876 along with CVE-2026-58936 in the System component, all impacting Android versions 14 through 17. Additional patches cover privilege escalation, information disclosure, and denial-of-service issues across the kernel, Bluetooth, virtualization layers, and chipsets from MediaTek and Qualcomm. No evidence of in-the-wild exploitation has been noted in the bulletin, yet the critical nature of the remote code execution bugs warrants immediate attention. Users must verify the 2026-11-05 patch level or newer in device settings, as simply running the latest Android version does not guarantee all fixes are installed. Some updates arrive via Google Play system updates while others depend on device manufacturers.
Backdoor with Password 123456 and Hardcoded Keys: How AI Cracked 'Encrypted' USB Drives
An AI agent rapidly discovered critical cryptographic weaknesses in multiple USB encryption and copy-protection products, including hardcoded backdoor accounts and keys that bypassed user passwords entirely. In the SecZure YutianDun drive, two hidden accounts with passwords 123456 and SECZURE.COM allowed full decryption of files without the administrator password. NetacFileLock used a fixed AES-256 key embedded in the binary, ignoring the user password completely while also logging passwords in plaintext and employing ECB mode. KakaSoft USB Copy Protection relied on a modified MD5 implementation with altered shift constants and a hardcoded internal password derived from an embedded seed, enabling full Blowfish decryption without any user input. Nexcopy stored its Triple DES content key and IV in an encrypted configuration file protected only by a fixed 32-byte certificate inside the viewer application. The AI completed analyses in minutes that previously required hours of manual time-travel debugging and reverse engineering.
CVE-2026-98432: Temporary nftables Filter with Auto-Rollback for Ubuntu Servers
Administrators are deploying a temporary nftables-based mitigation for CVE-2026-98432 on Linux systems while awaiting official kernel patches. The filter drops IPv4 TCP packets with IP header length exceeding five, reducing exposure to the vulnerability. The procedure includes verifying kernel status via Canonical, preparing rollback commands, and using systemd timers to automatically remove the table after five minutes if connectivity is lost. Steps cover syntax validation with nft --check, integration with existing firewall configurations, and post-reboot verification to ensure the temporary table persists without interfering with ufw or Docker rules. Red Hat guidance on discarding packets containing IP options is referenced as a complementary measure. The process is designed for single-server testing before scaling to production fleets, with explicit instructions to avoid flush ruleset operations that could disrupt other tables.