HabrSeptember 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

BoletimSecVulnerabilities & Exploits

WordPress Patches Critical Core Vulnerability CVE-2026-87902 Affecting All Versions from 4.7.0

WordPress has released patches for a critical vulnerability in the platform's core code, tracked as CVE-2026-87902 with a CVSS score of 9.2. The flaw impacts every version from 4.7.0 through 7.1.1, meaning virtually all unpatched installations remain exposed. Because the issue resides in the base system rather than plugins or themes, even sites without any extensions installed are at risk. The vulnerability allows an unauthenticated attacker to load arbitrary PHP files from outside theme directories, which can lead to remote code execution on certain server configurations. The bug was privately reported in July by researcher Robert Ressl through HackerOne and disclosed publicly on 22 September, with no confirmed exploitation observed so far. Administrators are urged to apply the updates immediately and keep automatic updates enabled.

BoletimSecVulnerabilities & Exploits

Critical Microsoft SharePoint Vulnerability Allows Remote Code Execution via SafeControls Bypass

A vulnerability tracked as CVE-2026-65660 with a CVSS score of 8.8 affects Microsoft SharePoint Server 2016, SharePoint Server 2019, and Subscription Edition. The flaw permits an authenticated low-privileged attacker to achieve arbitrary code execution on on-premises servers. It stems from improper handling of quotes in attacker-controlled Register directives within the ToolPane component, bypassing the SafeControls mechanism. This allows registration of dangerous .NET classes followed by deserialization-based remote code execution. Microsoft released patches on August 11, 2026, and initially reported no public disclosure or exploitation. Publication of a detailed technical analysis has now increased the risk for unpatched installations.

AntiMalwareVulnerabilities & Exploits

Google Chrome Prepares Deferred Restart Feature to Apply Security Updates Without Disruption

Google is developing a queued restart capability for Chrome that lets the browser install updates after detecting user inactivity instead of forcing an immediate closure. The feature, tracked under the queued-restarts theme in Chromium code, offers users the choice to restart right away or wait for roughly five minutes of idle time. Chrome will automatically skip the restart if the browser is downloading files, playing audio or video, recording the screen, or using the camera. Notifications and a menu indicator labeled Scheduled Restart will inform users of the planned update, while additional reminders may appear when opening new tabs. The implementation currently lacks the ability to select a precise restart time like Windows Update and remains limited to the absence of activity. Google has previously committed to reducing the annoyance of mandatory browser restarts for security patches, though the feature has not yet reached the stable channel.

AntiMalwareVulnerabilities & Exploits

Windows 11 Update KB5124010 Triggers Crashes in Battlefield 6 and Other Titles

An optional non-security update KB5124010 for Windows 11 versions 24H2 and 25H2 is causing sudden game crashes for players of Battlefield 6, Battlefield 2042, and titles using Easy Anti-Cheat. The patch, initially distributed to Windows Insider participants and later made available broadly in early September, leads to silent exits within 15-30 seconds or a few minutes after launch. Reinstalling games, verifying DirectX installations, and repairing anti-cheat components have failed to resolve the issue, while uninstalling KB5124010 has restored functionality in multiple cases. The crashes are suspected to stem from conflicts with anti-cheat systems, including Electronic Arts' Javelin used in Battlefield titles and Easy Anti-Cheat in games such as Wardogs, which reports error WD-L020-95bc94d86a0d. Microsoft has not officially confirmed any link to anti-cheat software, and the problems affect users across diverse hardware configurations. Players are advised to skip the optional update until further clarification or a fix is provided.