Skip to content

Never use an http XML-RPC endpoint for https sites - #25869

Open
crazytonyli wants to merge 4 commits into
trunkfrom
fix/xmlrpc-https-downgrade
Open

Never use an http XML-RPC endpoint for https sites#25869
crazytonyli wants to merge 4 commits into
trunkfrom
fix/xmlrpc-https-downgrade

Conversation

@crazytonyli

Copy link
Copy Markdown
Contributor

Note

The issue (GHSA-qxpr-7v78-mh5g) would only occur if https XML-RPC request fails but http XML-RPC request succeeds. It's probably not very likely. But I think it's still good to patch it.

Description

When a self-hosted site was added with an https:// address, the app could silently fall back to an http:// XML-RPC endpoint and persist it, so the username and application password were then sent in plaintext on every XML-RPC call.

  1. WordPressOrgXMLRPCValidator no longer resolves an http:// endpoint for an https:// site: it stops probing an http variant of the host, and rejects any endpoint that discovery resolves to unless it is also https. This prevents new downgraded endpoints.

  2. For records already downgraded by older versions, Blog.xmlrpcURL returns the https-upgraded endpoint for an https site, and every XML-RPC client is now built from it (Blog.xmlrpcApi, the Zendesk profile fetch, and the site settings credential check). The persisted xmlrpc value and the Keychain entry keyed by it are left untouched, so credential lookups is not affected.

When the entered site address is https, WordPressOrgXMLRPCValidator no
longer probes an http variant of the same host, and any endpoint that
discovery resolves to (via redirects or RSD links) is rejected unless it
is also https. Previously the username and application password were
sent to the http endpoint whenever the https xmlrpc.php probe failed,
and the plaintext endpoint was persisted (GHSA-qxpr-7v78-mh5g).
Older app versions could silently downgrade a site's discovered XML-RPC
endpoint to http and persist it, so later XML-RPC traffic and the
credentials it carries crossed plaintext (GHSA-qxpr-7v78-mh5g). Blog.xmlrpcURL
returns the https-upgraded endpoint for an https site, and every credential
bearing XML-RPC client is now built from it (Blog.xmlrpcApi, the Zendesk
profile fetch, and the site settings credential check) instead of the raw
stored value. The persisted xmlrpc and the Keychain keyed by it are left
unchanged, so credential lookups still resolve; only the request endpoint is
upgraded, at the point the client is constructed. This closes the downgrade
regardless of launch timing or store restoration, with no migration pass.
@crazytonyli crazytonyli added this to the 27.2 milestone Aug 5, 2026
@crazytonyli
crazytonyli requested a review from jkmassel August 5, 2026 07:36
@wpmobilebot

wpmobilebot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number33628
VersionPR #25869
Bundle IDorg.wordpress.alpha
Commit8cf3c89
Installation URL5nqfa590981e0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number33628
VersionPR #25869
Bundle IDcom.jetpack.alpha
Commit8cf3c89
Installation URL5ddenpfpae8po
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants