Skip to content
SQL injection Write-up Beginner

SQL injection in harvard subdomain

The availability.php endpoint on a Harvard subdomain reflected user input in the users parameter, allowing cross-site scripting, and the day parameter was vulnerable to SQL injection. An attacker could run arbitrary script in a victim's browser or use SQL injection to dump database tables.

Brandon Roldan Follow

Published on noob3xploiter.medium.com

Hi. In this writeup, i will show you a sqli that i found in harvard and also, a xss as a bonus

Brandon Roldan, on noob3xploiter.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 endpoint concatenated the users and day parameters directly into HTML output and a SQL query without sanitisation or parameterisation.

Impact

An attacker could execute script in a victim's browser and could use SQL injection to dump database tables; the report does not show further exploitation.

What the attacker needed

Reachable subdomain endpoint; no authentication mentioned

The fix

The endpoint was fixed and now returns a 404 error.

How it was found

  1. Fuzz the subdomain's directories to find availability.php.
  2. Fuzz parameters to discover the users parameter.
  3. Add year, month and day parameters until the page returns data.
  4. Put script content in the users parameter and observe it executes.
  5. Put a single quote in the day parameter and observe a SQL error.

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 website that puts your input straight back into the page without cleaning it can let an attacker run their own script in your browser; this is called cross-site scripting. Separately, when a site builds a database query from raw input, a special character can break the query and let an attacker read data; this is SQL injection.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More from Harvard University

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.