T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/core.py:305- Finding
Caller-Controlled User IDs Allow Account and Owner Impersonation
- Content
View full analysis
timedelta(days=PLEDGE_DAYS): return False, ("The pledge has expired."), u limit = { "match": QUOTA_MATCH, "reveal": QUOTA_REVEAL, "publish": QUOTA_PUBLISH }.get(action) if limit is not None: used = used_today(uid, action) if used + need > limit: return False, ("The daily quota is insufficient."), u return True, "", u ``` The original source contains localized user-facing messages; they are translated above without changing the control flow. ### Technical Analysis Every security-sensitive command accepts a user identifier such as `U001` from the command line and treats possession of that identifier as proof of identity. There is no password, session credential, API token, cryptographic signature, operating-system account binding, or interactive identity verification. `is_owner()` grants owner privileges solely by looking up the caller-supplied identifier. Likewise, `check_access()` verifies only that the selected database record exists, has signed the pledge, and has quota remaining. It does not authenticate the process invoking the command. Consequently, knowing or guessing an owner identifier is sufficient to pass owner ch ...[truncated 1467 chars]- Remediation
View remediation
