QWED

Type to search pages, engines and advisories.

    Looking for API details?Search the docs

    Security·Advisories·GHSA-qjhf-xg26-439q

    IamGuard wildcard matcher is not AWS-equivalent: explicit Denies silently drop (High)

    highFixed in 0.4.0GHSA-qjhf-xg26-439q · Published 13 November 2026

    Summary

    IamGuard (qwed_infra/guards/iam_guard.py, _match_pattern :51-80, condition lookup :175) does not implement AWS IAM matching semantics. Divergences let a Deny statement that AWS would enforce silently drop, so the guard reports allowed=True and mints proof-bearing VERIFIED/ADMIT attestations for forbidden access. Reachable from a plain policy document.

    Affected

    qwed-infra <= 0.3.0 (verified on main @ b3098be = v0.3.0). No patched version yet.

    Details (all: Allow */* plus one Deny)

    1. Action case: Deny S3:* does not match action s3:GetObject (exact ==; AWS actions are case-insensitive) > allowed=True. Control Deny s3:GetObject > False.
    2. ? wildcard: Deny arn:aws:s3:::secret-bucke?/* does not match (pattern split on * only; ? stays literal, but AWS means one character) > allowed=True.
    3. * covers only \x00-\xff: Deny secret-bucket/* does not match non-ASCII keys > allowed=True. Control ASCII key > False.
    4. Policy variables never substituted: Deny home/${aws:username}/* with aws:username=alice does not match (no substitution anywhere in file) > allowed=True.
    5. Condition keys matched case-sensitively (context.get(key)): Deny IpAddress on aws:sourceip with context key aws:SourceIp does not match (AWS documents condition key names as case-insensitive) > allowed=True. Same-case control > False.

    Impact

    A Deny that AWS enforces is dropped and QWED issues a proof-bearing allow (VERIFIED diagnostic + signed attestation + ADMIT verification context). Mirrored Allows give false denials.

    Fix direction

    Lower-case actions; ? = exactly one character; * over the full Unicode alphabet; substitute ${aws:*} from context (UNVERIFIABLE when unresolvable); case-insensitive condition-key lookup; decode $${ escapes. Regression tests: each variant must deny, mirrored Allows must permit.

    CWE

    CWE-693 (Protection Mechanism Failure).

    All advisories

    Affected and fixed

    qwed-infra

    Affected<= 0.3.0 Fixed in0.4.0
    View on GitHub