Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
11
22
vuln
stringlengths
35
76
domain
stringclasses
4 values
code
stringlengths
101
326
must_hit
listlengths
1
3
capability
listlengths
1
1
fix
listlengths
1
1
distractors
listlengths
1
1
authz_alt_path
email route lacks the ownership check the read route has
access_control
def get_invoice(user, invoice_id): inv = db.get_invoice(invoice_id) if inv.owner_id != user.id: raise Forbidden() return inv def email_invoice(user, invoice_id, destination): inv = db.get_invoice(invoice_id) mailer.send(destination, inv.contents)
[ [ "email" ], [ "owner", "ownership", "authoriz", "permission", "access control", "tenant" ], [ "missing", "no ", "not ", "lacks", "without", "fails", "absent", "never" ] ]
[ [ "another user", "other user", "any invoice", "not own", "does not own", "arbitrary", "other tenant", "someone else" ] ]
[ [ "check", "verify", "validate", "enforce", "policy", "scope", "same" ] ]
[ [ "index", "performance", "efficien", "slow query" ] ]
mass_assign_role
role assigned from client-controlled payload (privilege escalation)
access_control
def update_profile(request, current_user): payload = request.json current_user.display_name = payload["display_name"] current_user.role = payload["role"] db.save(current_user)
[ [ "role" ], [ "privileg", "escalat", "admin", "authority", "elevat", "mass assign", "mass-assign" ] ]
[ [ "any role", "become admin", "administrator", "elevate", "escalate", "grant themselves", "set themselves" ] ]
[ [ "allowlist", "whitelist", "separate", "remove", "do not", "should not", "only admin", "exclude", "never" ] ]
[ [ "sql", "injection", "xss" ] ]
second_order_ssrf
stored user URL later fetched server-side (SSRF)
web_security
def set_webhook(user, url): user.webhook_url = url db.save(user) def notify(user, event): http.post(user.webhook_url, json=event)
[ [ "ssrf", "server-side request", "server side request", "internal", "metadata", "loopback", "localhost", "private", "arbitrary url", "attacker-controlled url", "attacker controlled url", "outbound request", "unvalidated url", "url is fetched" ] ]
[ [ "internal", "metadata", "169.254", "private network", "scan", "reach" ] ]
[ [ "allowlist", "whitelist", "validate", "scheme", "block", "deny", "restrict" ] ]
[ [ "xss", "sql" ] ]
traversal_after_decode
validation runs before decoding, so traversal appears after (path traversal)
web_security
def save_file(filename, data): if ".." in filename: raise ValueError("invalid") decoded = unquote(filename) path = UPLOAD_DIR / decoded path.write_bytes(data)
[ [ "traversal", "..", "directory", "escape", "outside" ] ]
[ [ "arbitrary", "overwrite", "outside", "escape", "any file", "system file" ] ]
[ [ "canonical", "resolve", "realpath", "after decod", "normaliz", "confine", "validate the decoded" ] ]
[ [ "performance" ] ]
edit_after_approval
amount mutable after approval; execution trusts stale status
general
def approve(p): p.status = "approved"; save(p) def edit(p, amount): p.amount = amount; save(p) def execute(p): if p.status == "approved": provider.transfer(p.amount)
[ [ "after approv", "approved amount", "changed after", "edit", "mutat", "snapshot", "immutab" ], [ "amount" ] ]
[ [ "arbitrary amount", "larger", "any amount", "more than", "increase", "different amount" ] ]
[ [ "freeze", "immutab", "snapshot", "invalidate", "re-approv", "reauthor", "version" ] ]
[ [ "sql", "xss" ] ]
token_not_consumed
reset token never marked used (reusable)
access_control
def reset_password(token_value, new_password): token = db.get_reset_token(token_value) if token.expires_at < now(): raise InvalidToken() user = db.get_user(token.user_id) user.password_hash = hash_password(new_password) save(user)
[ [ "reus", "once", "single use", "single-use", "consum", "invalidat", "not marked", "remains valid", "multiple times", "again", "double-use", "double use", "twice", "re-use", "reused", "not consumed", "double use of token" ] ]
[ [ "again", "repeatedly", "multiple", "takeover", "reset again", "future" ] ]
[ [ "consume", "mark", "invalidat", "delete", "single use", "single-use", "transaction" ] ]
[ [ "xss" ] ]
toctou_stock
check-then-act on stock is not atomic (race / oversell)
general
def purchase(product_id, customer): p = db.get_product(product_id) if p.stock <= 0: raise OutOfStock() charge(customer, p.price) p.stock -= 1 db.save(p)
[ [ "race", "concurren", "atomic", "toctou", "simultaneous", "time-of-check", "time of check" ] ]
[ [ "oversell", "oversold", "negative", "two", "double", "more than", "twice" ] ]
[ [ "atomic", "lock", "transaction", "constraint", "compare-and-swap", "conditional update", "where stock" ] ]
[ [ "xss", "injection" ] ]
client_identity_header
identity taken from a client-suppliable header
access_control
def current_user(request): user_id = request.headers["X-User-ID"] return db.get_user(user_id)
[ [ "header" ], [ "forge", "spoof", "supply", "client", "arbitrary", "trust", "impersonat", "tamper" ] ]
[ [ "any user", "impersonat", "other user", "admin", "act as" ] ]
[ [ "gateway", "strip", "sign", "verify", "session", "token", "authenticat", "not trust", "should not" ] ]
[ [ "performance" ] ]
worker_trusts_queue
worker trusts mutable amount/id from the queue message
general
def process_refund(message): provider.refund(payment_id=message["payment_id"], amount=Decimal(message["amount"]))
[ [ "trust", "authoritative", "message", "queue", "validat", "verify" ], [ "amount", "payment_id", "state" ] ]
[ [ "arbitrary", "tamper", "replay", "inject", "forge", "duplicate", "any amount" ] ]
[ [ "load", "authoritative", "database", "verify", "validate", "operation id", "idempot", "re-check", "recheck" ] ]
[ [ "xss" ] ]
negative_amount
only balance>=amount checked; negative amount inverts the transfer
general
def transfer(source, recipient, amount): if source.balance < amount: raise ValueError("insufficient funds") source.balance -= amount recipient.balance += amount
[ [ "negative", "less than zero", "below zero", "non-positive", "must be positive", "not positive", "positive" ], [ "amount" ] ]
[ [ "increase", "gain", "steal", "drain", "inflate", "own balance", "victim" ] ]
[ [ "positive", "greater than zero", "> 0", ">0", "amount <= 0", "validate" ] ]
[ [ "sql", "xss" ] ]
fail_open_authz
authorization fails open on timeout
access_control
def may_access(user, resource): try: return authz_service.check(user.id, resource.id) except TimeoutError: return True
[ [ "fail open", "fail-open", "returns true", "grant", "allow", "open" ] ]
[ [ "unauthorized", "any user", "bypass", "all access", "everyone" ] ]
[ [ "fail closed", "fail-closed", "deny", "false", "cache", "degrade" ] ]
[ [ "performance", "latency only" ] ]
timing_compare
secret compared with non-constant-time equality
cryptography
def check_api_key(provided): expected = load_expected_key() if provided == expected: return True return False
[ [ "timing", "constant time", "constant-time", "side channel", "side-channel", "byte by byte", "early return" ] ]
[ [ "recover", "guess", "brute", "infer", "leak", "extract" ] ]
[ [ "compare_digest", "constant", "hmac", "secrets.compare", "hash" ] ]
[ [ "sql", "xss" ] ]
duplicate_refund_path
support route issues a refund bypassing the controlled workflow
general
@app.post("/orders/<oid>/refund") @finance_required def refund_order(oid): return refund_service.refund(oid) @app.post("/support/orders/<oid>/resolve") @support_required def resolve_order(oid): o = db.get_order(oid) if o.customer_complaint: provider.refund(o.payment_id) o.status = "resolved"; s...
[ [ "support", "second", "alternate", "another path", "bypass", "duplicate", "two routes", "separate route", "bypasses" ], [ "refund" ] ]
[ [ "twice", "duplicate", "multiple", "repeatedly", "without finance", "lower privileg", "bypass" ] ]
[ [ "single", "one workflow", "shared", "centraliz", "same service", "idempot", "state check" ] ]
[ [ "xss" ] ]
idor_delete
delete route authenticates but does not authorize the object
access_control
@app.delete("/files/<fid>") @login_required def delete_file(fid): db.delete(db.get_file(fid)) return {"ok": True}
[ [ "owner", "ownership", "authoriz", "permission", "idor", "object-level", "object level", "tenant" ], [ "missing", "no ", "not ", "lacks", "without", "only auth", "authenticat" ] ]
[ [ "any file", "another user", "other user", "arbitrary", "not own", "anyone" ] ]
[ [ "check", "verify", "scope", "policy", "enforce" ] ]
[ [ "index", "performance" ] ]

FBE and VAB

Two small benchmarks for security code analysis. Both grade without an LLM judge, so runs are cheap and repeatable.

FBE (find-the-bug)

14 code snippets, each with one planted vulnerability. Ask the model to analyze the code, then check whether it actually found the flaw.

Grading uses concept groups: the answer has to contain at least one synonym from every required group. Four numbers come out:

  • found, did it identify the real vulnerability (this is the one that matters)
  • capability, did it say what the attacker gains
  • fix, did it propose a remediation at a sensible layer
  • distracted, did it wander onto something irrelevant (lower is better)

Bug classes: missing object-level authorization on a sibling route, mass assignment of a role, second-order SSRF through a stored URL, path traversal where validation runs before decoding, edit-after-approval, a single-use token that is never consumed, a check-then-act race on inventory, identity taken from a client-supplied header, a worker trusting mutable queue fields, negative-amount transfer, authorization that fails open, non-constant-time secret comparison, a support route that bypasses the refund workflow, and a delete route that authenticates but doesn't authorize.

Row format:

{"id": "...", "vuln": "...", "domain": "...", "code": "...",
 "must_hit": [["synonym", "..."]], "capability": [[...]], "fix": [[...]], "distractors": [[...]]}

VAB (multiple choice)

20 MCQ items over code and scenarios: broken invariant, root cause, capability (knowledge, influence, access, authority, execution), chain validity, missing check, confidence, negative space, state sequence. For chain validity the options are fixed: A proven, B probable, C speculative, D blocked.

Worth knowing before you use it: VAB rewards short forced-choice answers. A model tuned to write long-form analysis can drop on VAB while being unchanged or better at actually finding bugs. We measured exactly that. Treat FBE as the real signal and VAB as a secondary one.

Reference numbers

Qwythos / Qwen3.5-9B 4-bit base: FBE found 79%, FBE full credit 43%, VAB 75%.

Use

Authorized security evaluation and research. All snippets are generic.

Downloads last month
31