GitHub advisory · PyPI
Mareforma: Unsigned Claims Can Be Promoted to REPLICATED via Missing Signature Enforcement in Convergence Path
Description
mareforma 0.3.3 contains a critical integrity flaw in the REPLICATED convergence logic (_maybe_update_replicated_unlocked() in mareforma/db/core.py:1300-1319). The peer-selection SQL query that determines whether two independent claims "agree" on the same anchor does not verify that either claim carries a valid cryptographic signature from an enrolled validator key. Because rekor_enabled=False is the default and automatically sets transparency_logged=1 at insert time, every claim — signed or not — immediately satisfies the convergence precondition. An attacker with no Mareforma key can write an unsigned claim to a shared graph, cause it to converge with a legitimate signed peer claim, and have it promoted to REPLICATED status. The forged REPLICATED row is then returned by the default trust query (graph.query(min_support="REPLICATED")), allowing the attacker to inject false trust signals into any downstream consumer relying on REPLICATED as a multi-party endorsement guarantee.
Root cause — mareforma/db/core.py:1300-1319
The convergence function _maybe_update_replicated_unlocked() selects peer claims using a SQL query that filters on status, unresolved, transparency_logged, and artifact_hash, but contains no predicate on signature_bundle or enrolled-key identity:
# mareforma/db/core.py:1300-1319
rows = conn.execute(
f"""
SELECT DISTINCT c.claim_id, c.generated_by
FROM claims c, json_each(c.supports_json) j
WHERE j.value IN ({placeholders})
AND c.claim_id != ?
AND c.generated_by != ?
AND c.support_level != 'ESTABLISHED'
AND c.status = 'open'
AND c.unresolved = 0
AND c.transparency_logged = 1
AND (
c.artifact_hash IS NULL
OR ? IS NULL
OR c.artifact_hash = ?
)
""",
Once peer rows are collected, the sink at core.py:1324-1334 promotes all matching claim IDs — including the attacker's — to…
Manual fix · PyPI
pip install --upgrade "mareforma>=0.3.7"Sources