PT-2026-122442

Publicado

2026-10-23

·

Atualizado

2026-10-23

Descrição por

CVSS 4.0
7.1
Alta
MétricasAV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Summary

create entity, link entities, rename entity, unlink entities and delete entity regenerate a memory note's body from SQLite at the computed memory/<type>/<name>.md path. When a note already existed at that path and was not owned by the entity being written (a hand-authored note, or an orphan left by a different entity whose name sanitized to the same path), its entire body was overwritten on the next write naming that (type, name), keeping only its frontmatter. Separately, several of these tools inserted or removed their SQLite row before the fallible filesystem step, so a refused note write could leave a relation gone, a retired status committed, or the wrong entity deleted.

Details

  • create entity and link entities inserted the SQL row or relation before materialization.
  • rename entity seeded the destination path with a direct atomic write that bypassed the ownership check, and for a status-only rename could commit a retired status with the note write refused.
  • unlink entities removed the relation row before discovering the source note's rematerialization would be refused.
  • delete entity's cascade could delete the target and its relations before a neighbour's note was found to be foreign.
The overwrite exists in every released version since materializeEntity shipped (git show v1.0.1:packages/server/src/memory/materialize.ts).

Impact

An authorized caller with memory-write scope (any agent using the M5 memory tools) can, without intending to, destroy the body of a vault note outside the entity it is writing, and can leave the memory graph inconsistent with the notes on disk. Snapshots-before-write (restore note) mitigate the overwrite only where snapshots are enabled and the note had been written through obsidian-tc before.

Patches

Fixed in 1.31.4 at the shared primitive: materializeEntity refuses to write over a note whose obsidian tc id is missing or belongs to another entity; a new assertNoteOwnership pre-check runs before any SQLite mutation in the three lifecycle tools, so a refusal is a no-op; create entity and link entities roll back the row they had inserted. Verified by test/m5-memory-ownership.test.ts, which covers all five call sites and the rollback.

Workarounds

None that preserve the tools. Disabling the write:memory scope for callers prevents the write path entirely.

Credit

Found by the maintainer while building obsidian-tc memory import (PR #978); the vulnerability class was independently confirmed by a cross-vendor adversarial review.

References

  • PR #978 (fix and test), CHANGELOG ## [1.31.4] ### Security
  • packages/server/src/memory/materialize.ts, packages/server/src/tools/m5/memory-lifecycle-tools.ts

Explorabilidade
Correção
Impactos
Fornecedores
Produtos afetados
Identificadores relacionados
GHSA-R3G7-R4HR-M258
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾