Skip to content
SSRF Write-up Intermediate

Google Forms (WordPress plugin) SSRF vulnerability

The WordPress Google Forms plugin validated the target URL with a weak regular expression, so an attacker could supply a URL that passed the check but pointed to an arbitrary host. This allowed unauthenticated users to make the server send POST requests to internal or external hosts, enabling port scanning and, with a crafted response, a POST-based XSS attack.

klikki Follow

Published on klikki.fi

Google Forms is a WordPress plugin that can be used to embed forms from Google Docs. It has 20,000+ active install as of January 2018.

klikki, on klikki.fi

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 URL validation used a regular expression that only checked the beginning of the string, so URLs with extra subdomains or userinfo could bypass it.

Impact

An attacker could use the server to make requests to arbitrary hosts and ports, enabling port scanning of internal networks, and could also achieve a POST-based XSS attack against unauthenticated users; the nonce check probably mitigates the XSS against logged-in users.

What the attacker needed

WordPress site with the vulnerable plugin; Attacker can obtain a valid nonce; Victim (for XSS) must be unauthenticated or nonce check…

How it was found

  1. Get a valid WordPress nonce (CSRF token) by viewing the source of a page that contains a Google form.
  2. Base64-encode a double-quoted target URL.
  3. Send a POST request with the nonce and the encoded URL in the wpgform-action parameter to trigger the SSRF.

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 plugin needed to fetch a Google form from the internet, but it checked the address with a simple pattern match that could be fooled. An attacker could give it an address that looked like Google's but actually pointed to another computer, making the WordPress server send requests there. This is called server-side request forgery (SSRF): the server is tricked into making requests on the attacker's behalf.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More by klikki

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.