Habr•September 3, 2026•🇷🇺Translated from Russian

Bcrypt Password Hashing Silently Ignores Characters Beyond 72 Bytes, Breaking Verification Expectations

The bcrypt password hashing algorithm silently truncates inputs after the first 72 bytes, causing any characters beyond that limit to be ignored during both hashing and verification. This behavior has existed since the algorithm's introduction in 1999 and remains unchanged to preserve hash compatibility.

Developers discovered the issue when importing accounts from legacy systems. Passwords longer than 72 bytes verified successfully even when they differed in the ignored tail, leading to unexpected authentication results. Tests in PHP using PASSWORD_BCRYPT confirmed that a 72-character string and a 100-character string of the same prefix produce matching verification outcomes.

The root cause lies in Blowfish's P-table, which holds exactly 18 subkeys of 4 bytes each. The original specification fixed this 72-byte boundary, and any excess data is never fed into the key expansion function. Multibyte characters exacerbate the problem: 36 Cyrillic characters reach the limit, while 37 or more are truncated.

Practical risks appear in password managers that store full-length strings, during database migrations between libraries with differing truncation rules, and in corporate environments using long static prefixes. Python's bcrypt package version 4.x now raises an explicit error for inputs over 72 bytes, forcing developers to handle truncation manually or upgrade validation logic.

Mitigations include adding consistent 72-byte length checks on registration and login forms, pre-hashing passwords with SHA-256 encoded in base64 before passing to bcrypt, or migrating to algorithms without length limits such as Argon2id or scrypt. Systems should also audit all code paths that call the hashing function to ensure uniform enforcement.

Related articles

Habr•Vulnerabilities & Exploits

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.

Habr•Vulnerabilities & Exploits

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.

AntiMalware•Vulnerabilities & Exploits

Old iPhones Remain Vulnerable to Bootloader Exploits Despite Airplane Mode for Crypto Seed Storage

Founder of OneKey Ishi Wang has warned that resetting an old iPhone, enabling airplane mode, and storing a cryptocurrency wallet recovery phrase on the device does not provide reliable protection. Hardware vulnerabilities such as checkm8 affecting iPhone 4S through iPhone X and usbliter8 targeting A12 and A13 chips allow attackers with physical access to bypass the secure boot chain and execute code before iOS loads. These issues persist because the bootloader code cannot be overwritten through standard resets or iOS updates. While device passcode, Secure Enclave, and application-level encryption still serve as barriers, the risk level depends on the specific model, iOS version, and password strength. Wang advises against relying on disconnected older iPhones as cold storage solutions for seed phrases.

Habr•Vulnerabilities & Exploits

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

A common Docker Compose setup with exposed database ports on fresh VPS instances allows attackers to compromise systems within minutes despite active UFW rules. Docker's use of DNAT rules in the PREROUTING chain and insertion of DOCKER-FORWARD chains before UFW rules in the FORWARD table routes external traffic directly to containers on internal bridge networks. IPv6 support in Docker versions 27 and later creates additional exposure vectors when administrators focus only on IPv4 protections or disable IPv6 filtering. Bots scan cloud IP ranges for open ports including 5432 and 6379, deploying miners such as kdevtmpfsi and kinsing or using Redis replication to load malicious modules. Historical cases include a Qdrant test instance on Hetzner compromised in under two minutes and similar issues reported in Spree Commerce starter templates. The article details Netfilter mechanics, protected-mode limitations in Redis, and specific exploitation techniques like CONFIG SET for cron jobs and CVE-2022-0543 Lua sandbox escapes.