咪老师 (@user1558)cpa漏洞复现小记 中发帖

https://linux.do/t/topic/1892136 
https://linux.do/t/topic/1892269
前面冲浪的时候看到了cpa有漏洞,马上复线了一下
漏洞原理
CPA 的 /v1internal:generateContent 和 /v1internal:streamGenerateContent 端点:
不需要 API Key — 路由没有经过 AuthMiddleware
仅靠 RemoteAddr 检查 — strings.HasPrefix(c.Request.RemoteAddr, “127.0.0.1:”)
反向代理绕过 — nginx/cloudflared 转发流量时,TCP 连接来自 127.0.0.1,检查无效
直接使用服务器凭据 — 通过 ExecuteWithAuthManager 使用 CPA 服务端存储的 OAuth...