Security: Deleted content exposure + revision history IDOR via sequential IDs
还没有人认领这个 Issue。
评估
调研方向
先从受影响的两个端点的 AnswerService.Get 和 GetObjectTimelineDetail 入手,然后将它们的访问检查与 SearchList、GetRevisionList 和 GetQuestion 进行比较。跟踪已删除和待处理的问题、答案及修订是如何加载的。完成标准是:未经身份验证的用户不再能看到已删除的答案,经过身份验证的用户不再能看到已删除或待处理修订的内容,同时获准访问的内容仍然可以访问。
由索引模型根据 Issue 内容生成。
描述
Summary
Two information disclosure issues allow access to deleted/pending content:
1. Deleted Answer Content via GET /answer/api/v1/answer/info (Low-Medium)
`AnswerService.Get()` calls `answerRepo.GetByID()` which fetches answers by raw ID with no `status != deleted` filter. Deleted answers are returned with full content to unauthenticated callers.
Secure comparison: `SearchList` correctly filters: `session.Where("status != ?", entity.AnswerStatusDeleted)`
2. Revision History IDOR via GET /answer/api/v1/activity/timeline/detail (Medium)
`GetObjectTimelineDetail` fetches revision content by sequential integer ID (`autoincr BIGINT`). No check for whether the associated question/answer is deleted or pending. Any authenticated user can enumerate `revision_id=1,2,3...` to read full content of deleted/pending questions and answers.
Secure comparison: `GetRevisionList` correctly checks `objInfo.IsDeleted()` before showing history. `GetQuestion` blocks access to deleted/pending content.
Impact
- Bypasses content moderation (admin-deleted content remains accessible)
- Reveals pending-review content before publication
- Sequential revision IDs make enumeration trivial
Discovery
Found through automated security research comparing content visibility controls across endpoints.
- 主要语言
- Go
- 星标
- 15.7k
- 派生
- 1.4k
- 平均合并
- 1 天 20 小时
- 30 天内合并 PR
- 6
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/answer 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
-
Hardening: cap the invite_user list size in UpdateQuestionInviteUser to bound notification fan-out 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 88/100
-
Gravatar hash is computed from the un-lowercased email, so mixed-case accounts render an identicon 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
santhosh-tekuri/jsonschema#276 ·