Now Hacked
EN

Daily security quiz #1

Question for 2026-11-01. Read the code and pick the most serious security vulnerability.

EasyPython2026-11-01

This login code looks up a member by ID (PostgreSQL, psycopg). What is the most serious vulnerability?

def find_user(conn, username):
    cur = conn.cursor()
    query = f"SELECT id, password_hash FROM users WHERE username = '{username}'"
    cur.execute(query)
    return cur.fetchone()

Past questions