Skip to content

Independent cybersecurity briefing

Latest

RSS
Breaches, bounties, zero-days, and AI.

Bug Bounty Write Ups

TSA SQL Injection: Fake Crew Could Skip Security

*AI-assisted: drafted with AI help from public sources, then reviewed and edited. This is an analytical case study of a public disclosure, not my own discovery.*

Adam Hale, ZeroDay Times editorBy Adam Hale3 min read

Still life for “TSA SQL Injection: Fake Crew Could Skip Security”: a magnifier and a sealed envelope, copper dusk, Desk mark, signal CASE. [ BUG BOUNTY ] badge.

TSA SQL Injection: The Login That Skipped Security

AI-generated illustration

A basic SQL injection in FlyCASS, a vendor wired into TSA’s Known Crewmember system, let outsiders add fake crew who could skip screening

AI-assisted: drafted with AI help from public sources, then reviewed and edited. This is an analytical case study of a public disclosure, not my own discovery.

One quote character in a login form was enough to become an airline administrator inside a system that tells TSA who may skip airport screening. This TSA SQL injection sat in FlyCASS, a small vendor connected to the Known Crewmember (KCM) and cockpit access programs. Through it, researchers could have enrolled anyone as a pilot or flight attendant.

Disclaimer: * Educational and defensive use only. FlyCASS was disconnected from KCM and CASS in May 2024. Payloads and tooling are intentionally omitted.*

Vulnerability Overview

  • Type: SQL injection in a login form, leading to authentication bypass and unchecked admin actions
  • CWE (analytical mapping): CWE-89 (SQL Injection), CWE-284 (Improper Access Control)
  • CVE / CVSS: Not reported
  • Bounty: None. This was coordinated disclosure to government agencies, not a bug bounty program

What KCM and CASS Do

KCM lets airline crew use a dedicated lane and skip regular screening after their employment is checked with the airline. CASS lets a gate agent confirm that a pilot riding the cockpit jumpseat is authorized. The employment check is the whole control: it also returns the crew member’s photo.

ARINC, a Collins Aerospace subsidiary, routes those checks between TSA and 77 participating airlines. Smaller airlines need a system to answer, and FlyCASS sold them a web interface for it.

How the TSA SQL Injection Worked (high level)

Researchers Ian Carroll and Sam Curry found that each airline had its own FlyCASS login page. A single quote in the username field returned a MySQL error, a strong sign the input was pasted straight into the query. That allowed them to log in as an administrator of Air Transport International.

From there, nothing else stood in the way. An administrator could add employees and authorize them for both KCM and CASS, with no second approval and no link to the airline’s HR records. Their harmless test employee came back as approved for both.

They disclosed on 23 April 2024 to ARINC and the FAA, then to DHS through CISA. FlyCASS was disconnected on 7 May. The researchers later disputed public TSA statements that downplayed the risk.

Business Impact

A fake crew member could skip screening and request cockpit access. Editing an existing member’s name and photo would likely sidestep any vetting of new enrollments too. One small vendor became a weak link in national aviation security.

Fixing TSA SQL Injection-Style Gaps (my own analysis)

1. Parameterize every query. Login code should never build SQL from strings.

2. Verify the password, not a query result. Fetch by username, then compare a slow hash.

3. Require a second check for privilege grants. Adding crew should need airline-side confirmation.

# Pseudocode: parameterized login, hash check, two-party enrollment
def login(airline_code, username, password):
    row = db.query_one(
        "SELECT id, pw_hash, role FROM users WHERE airline=%s AND username=%s",
        (airline_code, username))                    # values bound, never concatenated
    if row is None or not argon2.verify(row.pw_hash, password):
        audit("login_failed", airline_code, username)
        return deny()
    return start_session(row.id, row.role, mfa_required=True)
def request_crew(admin, crew):
    return enrollment.create(crew, requested_by=admin.id, status="pending")
def approve_crew(approver, request):
    if approver.id == request.requested_by:
        return deny("no self-approval")              # a second person must sign off
    if not airline_hr.confirm_employee(request.employee_id, request.photo_hash):
        return deny("no matching HR record")         # external source of truth
    return enrollment.approve(request, approved_by=approver.id)
# Test: quote in username -> normal failure; self-approval -> denied

Key Takeaways

  • Vendors inherit your trust. Assess the smallest connected system like the core.
  • SQL injection is old, not gone. Login forms still need parameterized queries and testing.
  • High-impact grants need two parties and an external source of truth.

Credit & Sources

Discovered by Ian Carroll and Sam Curry. Primary source: Bypassing airport security via SQL injection, published 29 August 2024. Facts come from that write-up; analysis and code are original.

Next breakdown: another real account takeover from a public bug bounty report. Follow @masimshahzad for daily bug bounty breakdowns.

First published by Adam Hale on Medium.

Sources

Share

Corrections and tips:[email protected]