Hardening: re-validate the cached update version before building the package URL #23
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: hardening (not reachable by a lower-trust actor today). Found by security audit run 4 (commit
77fcd83).What happens
UpdateChecker::latestVersion()(src/Update/UpdateChecker.php:89-98) returns any string it finds in themulti_domain_redux_latest_versiontransient.filterUpdate()(:74-84) then puts that string straight into thepackageandurlfields it hands to core's updater.Today only
parseFeed()writes the transient, and it enforcesVERSION_REGEX. Anything else that writes the value would bypass that check, for example a direct DB edit, another plugin, or an object-cache collision. It would then control the path segment of the download URL. The origin stays fixed atgit.pickysysadmin.ca, which limits what that path control can reach.Suggested fix
Re-check the cached value in
latestVersion():Regression test: a transient holding
../../x/1.0.9or9.9.9/evilyields a refetch (ornull), never a package URL that contains it.