GitHub advisory · PyPI
Mareforma: search_claims skips verify-on-read, serving forged rows
Description
search_claims never calls _row_verified_on_read. Its row loop applies only the PRELIMINARY-unenrolled filter, then appends the row. query_claims runs the same projection but additionally re-verifies REPLICATED/ESTABLISHED signatures on read (line 4023) and drops any row that fails, per the documented tamper guarantee in the comment block above it: a high-trust row whose signature does not verify is excluded from query results entirely.
So a tampered or forged high-trust row splits the two read paths. Any process with DB write access, or an attacker copying a genuine validation envelope onto a fresh row, can flip a row to ESTABLISHED. query() drops it; search() serves it at its persisted trust level. Verified in a runtime check against a forged ESTABLISHED row:
query() returns forged row: False
search() returns forged row: True # support_level ESTABLISHED, 'verified' key absent
The docstring makes this worse: search_claims promises "the same projection as query_claims" and that the include_unverified filter "applies identically", so callers reasonably trust search results equally. The forged row also lacks the verified key entirely, so a consumer cannot tell it went unchecked.
High. The verify-on-read tamper exclusion is a stated trust guarantee, and search is a primary read surface. A forged ESTABLISHED finding that query correctly rejects is served by search as genuine, with no marker that verification was skipped.
mareforma/db/core.py:4206 search_claims row loop applies only the PRELIMINARY-unenrolled filter, then appendsmareforma/db/core.py:4114 search_claims signature and docstring, which claims query_claims-identical semanticsmareforma/db/core.py:4023 query_claims verify-on-read call that search_claims lacksMirror query_claims: add a verify_cache: dict = {} and, inside the search_claims row loop after the include_unverified check, drop…
Manual fix · PyPI
pip install --upgrade "mareforma>=0.3.8"Sources