DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › AI memory

What an Audit of the MemWal AI-Memory SDK Found: A Vote-Endpoint Bug and the Lessons Behind It

By Freedom251 Team · · 4 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The bug was not in the AI-memory SDK itself. According to Imrankhan’s September 24, 2026 DEV Community write-up of an audit of MemWal (Walrus Memory), the flaw sat in a sample chatbot app built on the SDK. A “vote on a message” endpoint checked for an existing vote using one scope and updated using another. That mismatch let one user plant a row that later broke another user’s voting while the API kept answering “success.”

Everything about the bug’s mechanics and its fix below comes from the author’s account. We have not reproduced it, and we could not find the affected source, a fixing commit, or a separate maintainer statement.

As an Amazon Associate I earn from qualifying purchases.

What the author reports

The endpoint in question records a vote on a chat message. Two queries matter:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The existence check (“does a vote already exist?”) looked up rows by messageId alone.
  • The update was scoped by both messageId and chatId.

Per the article, a logged-in user who could see a message in a public chat could submit a vote with their own chatId but someone else’s messageId. That inserted a mismatched row. When the message’s real owner next tried to vote, the existence check found the stray row by messageId and chose the “update” path. The update, scoped by both IDs, matched nothing, so zero rows changed. The endpoint still returned HTTP 200 with “Message voted.”

The pattern, in generic form

The following is an illustration of the bug class, not the project’s actual code:

  1. Check: SELECT ... WHERE messageId = ? (broad)
  2. If found: UPDATE ... WHERE messageId = ? AND chatId = ? (narrow)
  3. Respond success regardless of how many rows the update touched.

Each step looks reasonable alone. The defect is the disagreement between steps 1 and 2, compounded by step 3 hiding it.

What the impact was, and wasn’t

  • Reported consequence: a silently inserted mismatched vote row, and a later vote attempt by the legitimate owner that reported success without changing anything.
  • Not reported: data exposure, account takeover, or any compromise of the SDK’s memory storage. The article places the issue in the sample app, not the core SDK, the auth layer, or the on-chain contract.
  • Precondition: an authenticated user who can see the target message in a public chat.

It is an integrity and reliability flaw: the user’s action is silently dropped. That is milder than a data leak, but silent failures are hard for users and monitoring to notice.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The fix

The author writes: “I filed it, the maintainers confirmed and shipped a fix within days: scope the existence check the same way as the update.” Note that this is the author’s report, not a quotation from a maintainer. No specific fixing commit surfaced in the sources we could check, so treat “fixed within days” as the author’s account.

The second finding: a missing verification step

The author also describes an on-chain verification step present in one login-flow app but absent from a near-identical sibling app. They rate it lower severity because the affected app was explicitly demo-only and the riskiest downstream action was disabled. Together with the first finding, it supports the author’s central argument: sample apps and copy-pasted auth logic drift apart, and reviews that stop at the core library miss that drift.

Lessons worth taking

Use one scope for reads and writes

If an update is limited by owner or parent ID, the preceding lookup must be limited the same way. Better, build one scoped query helper so the check and update cannot diverge.

Treat zero affected rows as a result

An update that changes nothing when it should change one row is a signal. Return an error or log it rather than reporting success.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix duplicated logic everywhere

Imrankhan puts it this way: “when you fix a security issue in one place, check every place that duplicates that logic.” The login-flow finding is the same lesson in another form.

Audit demos like production code

Developers copy sample apps. A demo’s flaw can become someone’s production flaw.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Comparing this to other authorization defects

If you triage similar bugs in your own stack, these axes fit this case:

Question In this report
Is owner/tenant identity used consistently in reads and writes? No: lookup by messageId, update by messageId and chatId
Is failure visible to the caller or logs? No: HTTP 200 “Message voted” despite no change
Core component or sample app? Sample chatbot app, per the author
Did sibling implementations get the same fix? Not established in the sources we could check

About the project

MemWal / Walrus Memory’s official repository publishes the SDK as @mysten-incubation/memwal, with integrations and a flow that stores, recalls, and restores memories under an owner-plus-namespace boundary. The README states Apache 2.0 licensing and describes the project as beta, so check current code and docs before relying on any present-tense claim here. The SDK guidance says the namespace defaults to default, and recall has no default relevance threshold, so you should filter and calibrate by distance for your own data. This context describes the project; it says nothing about the vote endpoint.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Walrus Sessions 8 bounty track

The article promotes Walrus Sessions 8, running September 18 to October 9, 2026, with $2,500 in WAL prizes and a bug-bounty track of 5 prizes of $100 each. These figures come from the article’s own promotion, not independently verified terms. With the end date only days away, confirm the current rules with the organizers before planning to enter.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

AI memoryauthorization bugsMemWalopen sourceSDKSecurity AuditWalrus Memory

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.