Skip to content
UI spoofing Disclosed report Intermediate CVE-2022-31024

Federated editing allows iframing possibly malicious remotes

When a document is shared between two servers marked as trusted, editing the document causes the recipient's browser to load an iframe from the sender's server. A malicious trusted server could therefore serve code that tricks the user into re-entering their password.

rtod Follow

Originally disclosed on HackerOne

Bounty$100 Low View original
  • Triaged in 6 days
  • Fixed in 11 months
  • Paid in 12 months
  • Disclosed after 13 months

Summary by the program

https://github.com/nextcloud/security-advisories/security/advisories/GHSA-94hr-7g4v-f53r

The report

So this attack is less likely now that you killed the trusted server auto adding. But as far as I could tell you did not clear out old servers. Let me first describe the attack:

  1. UserA on ServerA sends a federated share to userB on serverB
  2. Assume serverA and serverB are trusted servers
  3. Now once the the trusted server is established when userB tries to edit the document it will do so on serverA. Hence the iframing

https://github.com/nextcloud/richdocuments/blob/master/lib/AppInfo/Application.php#L239

Impact

The issue I see with this is that; not until to long ago it was trivial to establish trusted servers with federation (or from public links).

The second issue is that userB now not only has to trust serverB to be secure, properly updated etc. But also trusts implicitly serverA. ServerA could serve malicious code. That shows that the user needs to resubmit their password for example. This is also not made clear on the settings to the admin that enabling trusted servers opens this possibility.

Now. I admit that this is all not super likely to all happen. But iframing remote sources when clicking to edit a document (which the user will just expect to open their own collabora) poses a real risk I think.

The original report as published on HackerOne, by rtod. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the editing view embeds the remote trusted server in an iframe without making clear to the user or admin that this grants that server influence over the page.

Impact

A malicious trusted server could serve code that prompts the user to resubmit their password, and the risk is not made clear to admins; the reporter admits the scenario is not very likely.

What the attacker needed

Two servers marked as trusted; a federated share between users; victim opens the document to edit

The fix

The text notes that auto-adding trusted servers was removed, but suggests old trusted servers should also be cleared and the risk documented to admins.

How it was found

  1. A user on one server sends a federated share to a user on another server.
  2. Both servers are configured as trusted servers.
  3. The recipient opens the shared document to edit it.
  4. The editing interface loads an iframe from the sender's server.

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 report has not been written yet. The Original tab links to the source.

Two servers can be set up to trust each other so files can be shared and edited across them. The report says that when you edit a shared document, your browser quietly loads part of the page from the other server. If that other server is malicious, it can show fake content to steal your password.

What is UI spoofing?

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.

More by rtod

View all

33 more disclosed reports, best first.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Clickjacking and UI spoofing

The lesson behind this report.

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.