Skip to content
SQL injection Write-up Beginner

Bypassing airport security via SQL injection

The FlyCASS login page for airline administrators was vulnerable to SQL injection in the username field, allowing an attacker to log in as an airline administrator. From there, the attacker could add arbitrary people as authorised crewmembers for KCM and CASS, letting them skip airport security screening and access airliner cockpits.

Ian Carroll Follow

Published on ian.sh

Like many, Sam Curry and I spend a lot of time waiting in airport security lines. If you do this enough, you might sometimes see a special lane at airport security called Known Crewmember (KCM).

Ian Carroll (@iangcarroll), on ian.sh

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 username was concatenated directly into the login SQL query instead of being passed as a parameter, so input could alter the query's logic.

Impact

Anyone with basic SQL injection knowledge could add anyone they wanted to KCM and CASS, allowing them to skip security screening and access the cockpits of commercial airliners; FlyCASS was subsequently disconnected from KCM/CASS.

What the attacker needed

Internet access to FlyCASS login page; basic SQL injection knowledge

The fix

The issue was fixed: FlyCASS was disconnected from KCM/CASS and later appears to have remediated the issues.

How it was found

  1. Try a single quote in the username field and observe a MySQL error.
  2. Use sqlmap to confirm the SQL injection.
  3. Log in as an administrator of an airline using a crafted username and password.
  4. Add a new employee with a chosen photo and authorise them for KCM and CASS.
  5. Use the query features to confirm the new employee is approved for KCM and CASS.

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 login form usually checks your username and password against a database. Here the site pasted whatever you typed straight into the database command, so a cleverly crafted username could trick the database into saying the login was correct. That let the researchers become an airline administrator and register fake crewmembers who could then bypass airport security checks.

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 by Ian Carroll

View all

3 more disclosed reports, best first.

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.