github mem0ai/mem0 openclaw-v1.0.3

7 hours ago

@mem0/openclaw-mem0 v1.0.3

Patch release — security fix, regression revert, supply-chain hardening

Compatibility: OpenClaw Gateway >=2026.3.24-beta.2 | mem0ai 2.3.0


What's Changed

Security

  • fix(openclaw): path traversal in skill-loaderreadSkillFile and readDomainOverlay constructed file paths from user-controllable config values (config.domain) via path.join() without verifying the result stayed within the skills directory. A crafted domain value containing ../ could read arbitrary files on the host filesystem. Added safePath() containment helper that resolves and validates all paths before any fs.readFileSync call. The exported loadSkill API is now self-defending against traversal inputs.

  • fix(openclaw): pin mem0ai to exact 2.3.0 — Changed "mem0ai": "^2.3.0" to "mem0ai": "2.3.0". The semver caret range accepted any 2.x.y >= 2.3.0, meaning a compromised minor or patch release would auto-install on npm install. Exact pinning eliminates this supply-chain vector.

Bug Fixes

  • fix(openclaw): revert broken Post-Compaction regex rename — PR #4678 renamed Post-Compaction to After-Compaction in two noise-filter regex patterns in filtering.ts, claiming this cleared a security scanner false positive. The upstream system emits messages with the literal string "Post-Compaction Audit", so the renamed regex silently stopped matching real noise — leaking compaction audit messages into the memory extraction pipeline. Reverted to the correct Post-Compaction pattern.

  • fix(openclaw): revert cosmetic comment change in recall.ts — Restored // Over-fetch for ranking comment (was changed to // Request more candidates for ranking to work around a scanner matching the substring fetch in a code comment).

Tests

  • Added 12 new tests in skill-loader.test.ts:
    • 8 unit tests for safePath() covering parent traversal, deep traversal, nested segment traversal, bare .., valid paths, and disguised traversal
    • 4 integration tests for loadSkill() covering traversal rejection, valid skill loading, and malicious domain overlay with valid skill

Upgrade

openclaw plugins install @mem0/openclaw-mem0@1.0.3

No configuration changes required. Fully backward-compatible with v1.0.2.


Don't miss a new mem0 release

NewReleases is sending notifications on new releases.