最新资讯
www.infoq.com Edera 推出 Object Capability Bounded Authority,试图将凭证与 AI Agent 工作负载隔离 wechat 这波杀疯了!旗舰级模型不限量、1个月视频额度免费领 dev.to 如何在专用 GPU 服务器上用 OpenAI 兼容 API 部署 LLM dev.to 审计 153 份 Claude Code 与 Codex 会话记录:User-Agent 与 URL 中的邮箱泄露 dev.to 你的 Agent Harness 应具备的 17 项能力 dev.to 离线 AI 记忆中 0.8 余弦阈值为何失效 dev.to Kimi K3.1 Pro 开放权重:自托管 2.8T 模型前的开发者清单 dev.to 如何通过工具调用引导模型以提升 Harness 质量 dev.to AI Agent 审计轨迹不等于对话记录 dev.to 精简 MCP server 工具数量:更少工具、更小影响面,双重收益 dev.to 为什么 git checkout 无法撤销 AI 编码 agent 的改动? wechat AI短剧门槛降降降!实测即梦短剧工作室:剧本分镜预演一条龙,伙伴计划长期护航
多元动态
登录 注册
智能体 dev.to · @Imrankhan

审计开源 AI 记忆 SDK 的收获,以及我发现的一个漏洞

原文 我的收藏

作者对开源项目 MemWal / Walrus Memory(为 AI Agent 提供跨会话持久记忆)进行安全审查,认为生产环境真正易出问题的不是嵌入质量而是所有权校验。他在一个示例聊天机器人中发现投票接口的漏洞:判断“是否已投票”只按 messageId 查询,而实际 UPDATE 同时限定 messageId 与 chatId,可能导致越权。

AI推荐理由 作者对开源 AI 记忆 SDK(MemWal / Walrus Memory)做安全审计,指出生产环境中真正易出问题的是所有权校验,并给出一个投票接口按 messageId 查询、却按 messageId 与 chatId 更新的越权漏洞。属于具体可验证的代码级发现,对构建多用户 Agent 记忆系统的开发者有参考价值。

70

正文

Most chatbots forget everything the moment a conversation ends. I spent a few days digging into an open-source project (MemWal / Walrus Memory) that tries to fix that — persistent, cross-session memory for AI agents — and ended up doing a full security review of the codebase along the way. Here's what actually stood out. ## The interesting part wasn't the AI Everyone talks about embeddings and semantic recall when they talk about "AI memory." The part that actually breaks in production is much more boring: ownership checks. Any system where User A's data must never leak into User B's session lives or dies on a handful of WHERE user_id = ? clauses. Get one of them wrong, and no amount of good embedding quality saves you. ## The bug While reviewing a sample chatbot app built on this SDK, I found a vote endpoint with a subtle but real bug: The "does a vote already exist?" check only looked up rows by messageId. The actual UPDATE was scoped by messageId AND chatId. Any user who could see a message in a public chat (message IDs are rendered right in the UI) could submit a vote using their own chat ID but a stranger's message ID. Since no vote existed yet for that message, it silently inserted a mismatched row. The nasty part: the next time the actual message owner tried to vote on their own message, the lookup found the attacker's row (again, scoped only by messageId), the UPDATE matched zero rows because the chatId didn't match, and the API returned 200 "Message voted" — while silently doing nothing. The real owner could never vote on that message again, and had no way of knowing why. Zero errors thrown. Zero logs. Just a permanently broken feature for one specific user, triggered by any other logged-in user. I filed it, the maintainers confirmed and shipped a fix within days: scope the existence check the same way as the update. ## The bigger lesson The core SDK, the auth layer, the on-chain contract — all of it was extremely well hardened. Constant-time comparisons, quarantine states, counter-based replay protection, the works. The bug wasn't in any of that. It was in a sample app that gets far less scrutiny than the "real" infrastructure around it. If you're reviewing (or building) a system like this, the example apps and demos are usually where the actual bugs hide — not the core library everyone stares at. ## A second, quieter finding ** I also found a spot where one sibling app (a login flow) had an on-chain verification step that its near-identical twin app was missing entirely — same function available in the codebase, just never called on one specific path. Lower severity (the affected app is explicitly demo-only and the riskiest downstream action was already disabled), but the same underlying lesson: **when you fix a security issue in one place, check every place that duplicates that logic. Copy-pasted auth code doesn't get security fixes for free. If you're building anything with persistent memory/state across sessions for an AI agent, happy to talk through what to watch for. This was part of a hackathon bug-bounty track, but the lessons apply to basically any multi-tenant app. This was part of Walrus Sessions 8 If any of this sounds interesting, Walrus Sessions 8: "Chatbots That Remember" is a live hackathon session running Sept 18 – Oct 9, 2026, with $2,500 in WAL prizes. The challenge: build (or retrofit) a chatbot that uses Walrus Memory to remember context across sessions, users, and devices — any use case counts (support, onboarding, tutoring, game NPCs, community bots). There's also a standalone Bug Bounty track (5 × $100) if finding bugs like the one above is more your thing than building a full chatbot — no chatbot required, just a reproducible bug filed on GitHub. Full details & rules: [link] MemWal repo: https://github.com/MystenLabs/MemWal

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容