Opened 7 minutes ago
Last modified 4 minutes ago
#66650 new task (blessed)
Upgrade sodium_compat to version 1.24.2
| Reported by: | desrosj | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | External Libraries | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Core currently bundles sodium_compat@1.24.1, which was updated in #65903 for 7.2.
The latest version on the v1.x branch is now 1.24.2, released on August 18, 2026.
This is a hardening release.
Full diff: https://github.com/paragonie/sodium_compat/compare/v1.24.1...v1.24.2
Previous:
Change History (1)
This ticket was mentioned in PR #15883 on WordPress/wordpress-develop by @desrosj.
4 minutes ago
#1
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Updates the bundled sodium_compat library from 1.24.1 to 1.24.2, the latest release on the v1.x branch that WordPress uses.
Changes
1.24.2 backports cryptographic boundary and validation fixes from the 2.x branch (sodium_compat#209):
verify_detached()rejects public keys of small order, and restores thefastMultsetting if an exception is thrown. This applies to both the 64-bit (Core) and 32-bit (Core32) implementations.0xffffffffinstead of0xffff.ParagonIE_Sodium_File:box_open()and the related methods decrypt into a temporary file, and only write to the destination after authentication succeeds.WordPress only loads sodium_compat when the native Sodium extension isn't available (
! function_exists( 'sodium_crypto_box' )inwp-includes/compat.php). These fixes only take effect on those sites.1.24.2 doesn't include any changes for PHP 8.6 compatibility.
How this follows previous updates
lib/,namespaced/andsrc/, plusautoload.php,autoload-php7.php,composer.jsonandLICENSE. That's 108 files, and upstream's tests and build tooling are left out.src/Core/Curve25519.php, which was missing its trailing newline in r63397. This PR restores the newline, so all 108 files now match upstream v1.24.2 byte for byte.Follow-up tolist.Testing
php -lpasses on the changed files under PHP 8.6.0-dev.vendor/bin/phpcs --standard=phpcompat.xml.dist src/wp-includes/sodium_compat/is clean.vendor/bin/phpcs src/wp-includes/sodium_compat/is clean.Use of AI Tools
🤖 Generated with Claude Code
https://claude.ai/code/session_011Y86gx1T9qpKZuJWesSGiZ