Skip to content
Access control Write-up Intermediate

Ocean Protocol

Ocean Protocol's dataset metadata did not verify that the file references in a dataset's service matched the dataset's own NFT and datatoken addresses. An attacker could create a dataset pointing at another user's file references and download the victim's files.

mirror.xyz

Published on mirror.xyz

The bugs sometimes hide in interesting places. Hybrid attacks are very interesting things, where projects rely on on-chain data that may be actually modified.

The author, on mirror.xyz

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

The provider service trusted the file reference inside the dataset's service record without checking that its embedded NFT and datatoken addresses matched the dataset being accessed.

Impact

An attacker could download files belonging to other datasets without authorisation, bypassing the intended access control tied to the NFT and datatoken.

What the attacker needed

Ability to create a dataset; knowledge of a victim dataset's file reference

The fix

The provider was fixed to compare the datatoken and NFT addresses inside the file reference against the service and asset addresses, raising an error on mismatch.

How it was found

  1. Create a dataset on Ocean Protocol.
  2. Modify the service file reference to use the file reference from another dataset.
  3. Access the created dataset and observe that the victim's file is downloaded.

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.

A dataset on Ocean Protocol is described by a record stored on a blockchain, and that record includes a pointer to where the actual file lives. The system never checked that this pointer belonged to the same dataset, so someone could copy another dataset's pointer into their own record and the system would fetch the other person's file.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.