{"vuln_id":"GHSA-rgg9-956j-3378","aliases":["CVE-2026-71500"],"description":"Mareforma: invalidated claims still promote to REPLICATED","published_at":"2026-11-19T16:04:43Z","modified_at":"2026-11-19T16:15:03.478359Z","first_seen_at":"2026-11-21T19:15:19.494582Z","severity":"medium","severity_source":"ghsa","cvss_score":6.8,"cvss_vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N","cwe":["CWE-754"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-rgg9-956j-3378"},"matched_alias":null,"items":[{"id":10720,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-rgg9-956j-3378: Mareforma: invalidated claims still promote to REPLICATED","summary":"Mareforma: invalidated claims still promote to REPLICATED\n\n## What's wrong\n\n`_maybe_update_replicated_unlocked` never checks `t_invalid`, so a claim that a signed contradiction verdict has marked invalid can still climb to REPLICATED through convergence detection, and it pulls an honest peer up with it.\n\nThree gaps line up:\n\n- The new-claim short-circuit reads only `status` and `asserter_keyid` (`core.py:1339-1352`); an invalidated but still-`open` new claim passes.\n- The candidate-peer SELECT filters `status = 'open'`, `unresolved = 0`, and `transparency_logged = 1` but has no `t_invalid` predicate (`core.py:1390-1410`), so an invalidated existing claim qualifies as a convergence partner.\n- The promotion UPDATE gates only on `status = 'open'` (`core.py:1422-1426`), leaving a TOCTOU window even after the SELECT is fixed.\n\nA signed contradiction verdict is meant to be terminal for the trust ladder: `validate_claim` refuses to promote a `t_invalid` claim to ESTABLISHED, and `record_replication_verdict` already gates its promotion UPDATE on `t_invalid IS NULL`. Convergence promotion is the one path that ignores the verdict. Reproduced at runtime: contradict claim X (t_invalid set, still PRELIMINARY), then assert peer Y sharing X's ESTABLISHED anchor; both X and Y land at REPLICATED, with X's `t_invalid` still set.\n\n## Severity and impact\n\n**High.** A refuted claim re-enters the trust ladder at REPLICATED after its contradiction, and it serves as the corroborating peer that promotes an honest claim. Both outcomes contradict the documented refutation model, and REPLICATED is the input to further validation.\n\n## Location\n\n- `mareforma/db/core.py:1339` new-claim short-circuit checks `status` and `asserter_keyid` but not `t_invalid`\n- `mareforma/db/core.py:1390` candidate-peer SELECT WHERE clause has no `t_invalid IS NULL` predicate\n- `mareforma/db/core.py:1422` promotion UPDATE gates on `status = 'open'` only, reopening the window between SELECT and UPDATE\n\n## Fix direction\n\nTreat `t_invalid` the way the neighboring code already does. Extend the new-claim short-circuit to also read `t_invalid` and return when it is set. Add `AND c.t_invalid IS NULL` to the candidate-peer SELECT. Add `AND t_invalid IS NULL` to the promotion UPDATE's WHERE clause so the row-level lock closes the TOCTOU window, matching the gate `record_replication_verdict` already applies at `core.py:3539`.\n\nDo red/green TDD: add a regression test that fails on `main`, then make it pass.\n\n## Quality bar\n\nSOLID, DRY, KISS. Clean, readable, well-tested code. No new errors, warnings, or test failures; the full suite stays green on all supported Python versions.\n\nAffected: PyPI:mareforma\n\nFixed in: 0.3.8\n\nReferences:\nhttps://github.com/mareforma/mareforma/security/advisories/GHSA-rgg9-956j-3378\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-71500\nhttps://github.com/mareforma/mareforma/pull/58\nhttps://github.com/mareforma/mareforma/commit/c9d8922132d916e4fd013890cb4e17921e00065e\nhttps://github.com/mareforma/mareforma\nhttps://github.com/mareforma/mareforma/releases/tag/v0.3.8","url":"https://osv.dev/vulnerability/GHSA-rgg9-956j-3378","published_at":"2026-11-19T16:04:43Z","updated_at":"2026-11-19T16:15:03.478359Z","fetched_at":"2026-11-21T19:15:55.946129Z","severity":"medium","cvss_score":6.8,"epss":0.00118,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"mareforma","vuln_id":"CVE-2026-71500","vuln_ids":["CVE-2026-71500","GHSA-RGG9-956J-3378"],"tags":["osv","pypi","fix-available"],"cluster_id":2258,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10720","html":"https://vulnwatch.ve1ve2.com/item/10720"}},{"id":2413,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-rgg9-956j-3378 / CVE-2026-71500: Mareforma: invalidated claims still promote to REPLICATED","summary":"Mareforma: invalidated claims still promote to REPLICATED\n\n## What's wrong\n\n`_maybe_update_replicated_unlocked` never checks `t_invalid`, so a claim that a signed contradiction verdict has marked invalid can still climb to REPLICATED through convergence detection, and it pulls an honest peer up with it.\n\nThree gaps line up:\n\n- The new-claim short-circuit reads only `status` and `asserter_keyid` (`core.py:1339-1352`); an invalidated but still-`open` new claim passes.\n- The candidate-peer SELECT filters `status = 'open'`, `unresolved = 0`, and `transparency_logged = 1` but has no `t_invalid` predicate (`core.py:1390-1410`), so an invalidated existing claim qualifies as a convergence partner.\n- The promotion UPDATE gates only on `status = 'open'` (`core.py:1422-1426`), leaving a TOCTOU window even after the SELECT is fixed.\n\nA signed contradiction verdict is meant to be terminal for the trust ladder: `validate_claim` refuses to promote a `t_invalid` claim to ESTABLISHED, and `record_replication_verdict` already gates its promotion UPDATE on `t_invalid IS NULL`. Convergence promotion is the one path that ignores the verdict. Reproduced at runtime: contradict claim X (t_invalid set, still PRELIMINARY), then assert peer Y sharing X's ESTABLISHED anchor; both X and Y land at REPLICATED, with X's `t_invalid` still set.\n\n## Severity and impact\n\n**High.** A refuted claim re-enters the trust ladder at REPLICATED after its contradiction, and it serves as the corroborating peer that promotes an honest claim. Both outcomes contradict the documented refutation model, and REPLICATED is the input to further validation.\n\n## Location\n\n- `mareforma/db/core.py:1339` new-claim short-circuit checks `status` and `asserter_keyid` but not `t_invalid`\n- `mareforma/db/core.py:1390` candidate-peer SELECT WHERE clause has no `t_invalid IS NULL` predicate\n- `mareforma/db/core.py:1422` promotion UPDATE gates on `status = 'open'` only, reopening the window between SELECT and UPDATE\n\n## Fix direction\n\nTreat `t_invalid` the way the neighboring code already does. Extend the new-claim short-circuit to also read `t_invalid` and return when it is set. Add `AND c.t_invalid IS NULL` to the candidate-peer SELECT. Add `AND t_invalid IS NULL` to the promotion UPDATE's WHERE clause so the row-level lock closes the TOCTOU window, matching the gate `record_replication_verdict` already applies at `core.py:3539`.\n\nDo red/green TDD: add a regression test that fails on `main`, then make it pass.\n\n## Quality bar\n\nSOLID, DRY, KISS. Clean, readable, well-tested code. No new errors, warnings, or test failures; the full suite stays green on all supported Python versions.\n\nAffected packages: pip:mareforma\nPatched: mareforma 0.3.8","url":"https://github.com/advisories/GHSA-rgg9-956j-3378","published_at":"2026-11-19T16:04:43Z","updated_at":"2026-11-19T16:04:44Z","fetched_at":"2026-11-21T19:15:18.416817Z","severity":"medium","cvss_score":6.8,"epss":0.00118,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"mareforma","vuln_id":"CVE-2026-71500","vuln_ids":["CVE-2026-71500","GHSA-RGG9-956J-3378"],"tags":["ghsa","pip","CWE-754"],"cluster_id":2258,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2413","html":"https://vulnwatch.ve1ve2.com/item/2413"}},{"id":8267,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-71500: Mareforma is a local verification layer for AI-assisted research. From 0.3.0 until 0.3.8, _maybe_update_replicated_unlocked in mareforma/db/core.py does not ch…","summary":"Mareforma is a local verification layer for AI-assisted research. From 0.3.0 until 0.3.8, _maybe_update_replicated_unlocked in mareforma/db/core.py does not check t_invalid in its new-claim gate, peer-selection query, or final update, so a claim marked invalid by a signed contradiction verdict can still be promoted to REPLICATED through convergence. The invalidated claim can also act as the corroborating peer that promotes an honest claim, bypassing the trust ladder's terminal refutation state. This issue is fixed in version 0.3.8.\n\nReferences:\nhttps://github.com/mareforma/mareforma/commit/c9d8922132d916e4fd013890cb4e17921e00065e\nhttps://github.com/mareforma/mareforma/pull/58\nhttps://github.com/mareforma/mareforma/releases/tag/v0.3.8\nhttps://github.com/mareforma/mareforma/security/advisories/GHSA-rgg9-956j-3378","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71500","published_at":"2026-11-18T23:17:21.173000Z","updated_at":"2026-11-19T21:45:06.477000Z","fetched_at":"2026-11-21T19:15:31.484050Z","severity":"medium","cvss_score":6.8,"epss":0.00118,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-71500","vuln_ids":["CVE-2026-71500","GHSA-RGG9-956J-3378"],"tags":["CWE-754"],"cluster_id":2259,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/8267","html":"https://vulnwatch.ve1ve2.com/item/8267"}}]}