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.
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).
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
- Try a single quote in the username field and observe a MySQL error.
- Use sqlmap to confirm the SQL injection.
- Log in as an administrator of an airline using a crafted username and password.
- Add a new employee with a chosen photo and authorise them for KCM and CASS.
- 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.