[RCE] Remote Code Execution in Wordpress iOS Application (version 9.3)
The WordPress iOS app allowed an attacker to inject an SVG payload containing JavaScript into a blog post, which when previewed executed code that read a local file and displayed its contents. This could let an attacker read files on the device, but only if the victim previews the malicious post.
Published on blog.evanricafort.com
{{media:1}} |
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the app rendered user-supplied SVG content without sanitising or restricting script execution, allowing JavaScript to run in the context of the app's web view.
What the attacker needed
A WordPress account; victim uses the iOS app; victim previews the malicious post
The fix
The app should sanitise or block script execution in user-supplied SVG content, for example by disallowing JavaScript in previews or rendering SVG as an image without script support.
How it was found
- Log in to the WordPress account using the WordPress iOS app.
- Create a new blog post.
- In the post body, tap the code button and input the SVG payload.
- Tap the code button again and observe the result.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The WordPress app for iPhones let someone put a special image file that contains a script into a blog post. When the post was previewed inside the app, the script ran and could read files stored on the phone. This is dangerous because a malicious post could steal private information from the device.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.