Skip to content
RCE Write-up Intermediate

RSS Feed Validator to RCE

A podcast platform's RSS feed validator fetched the image URL from an itunes:image tag and passed it to Ruby's File.open, which treats a leading pipe as an OS command. An attacker could supply a crafted feed to read local files and then run commands on the server as root.

anonanoon9 Follow

Published on medium.com

One Year since my first Writeup, and today I liked to share with you an vulnerability I have found on REDACTED website :)

Yazeed Bilal, on medium.com

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 application passed the attacker-controlled image URL straight into Ruby's File.open, which interprets a leading pipe as a shell command to execute.

Impact

An attacker could read files on the server and execute arbitrary OS commands, and the captured output showed the process running as root.

What the attacker needed

Ability to submit an RSS feed URL; attacker-hosted feed file; outbound request from server

How it was found

  1. Submit an RSS feed to the validator and intercept the request in a proxy.
  2. Notice the show_image response field and the itunes:image tag in the feed.
  3. Host a modified copy of the feed on your own server and point the image link at a local file path.
  4. Send the modified feed to the validator and observe the local file contents returned.
  5. Change the image link to start with a pipe followed by an OS command.
  6. Observe the command output arriving at an external listener.

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 site let users paste an RSS feed (a standard XML file that lists podcast episodes) and it would download the picture linked in that feed. The code that downloaded the picture used a Ruby function that also runs shell commands when the filename starts with a pipe character. So a user-controlled link turned into command execution on the server.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.