Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Found 3 Security Vulnerabilities in My Own AI Agent's Tool Access

说明与用途

在 GeoMart WebMCP 商城中,发现并修复了三处漏洞,防止 AI 代理在未获得人工批准的情况下提交报价。采取的措施包括 HTML 转义、isTrusted 检查、Cloudflare Turnstile 以及创建缺失的数据库表。

问题

AI agents in a WebMCP storefront were able to submit quotes without human approval due to insecure input handling, lack of authentication, and missing server-side validation.

结果

The application now securely requires human approval for quote submissions, preventing automated agent attacks and ensuring database integrity.

工作流

  • 1. Run Antigravity against the repo to identify vulnerabilities.
  • 2. Fix unescaped innerHTML by escaping all agent‑supplied strings before DOM insertion.
  • 3. Add an isTrusted check on the submit button’s click handler to block non‑browser clicks.
  • 4. Replace Origin header validation with Cloudflare Turnstile, verifying the token server‑side using a secret stored in a Worker secret.
  • 5. Create the missing quotes database table via migration and test the full submit flow.
  • 6. Retest with Antigravity to confirm all bypasses are blocked.

证据

Antigravity found that agent‑supplied text, the quote reasoning, the product IDs in the comparison tray, was going straight into the page via unescaped innerHTML.

来源

I added Cloudflare Turnstile, verified server‑side against a secret stored only in a Worker secret, never committed, never in the client bundle.

来源

  • 记录日期: 2026-09-22T10:15:41.515Z