Summary
paicoding's article detail endpoint does not adequately check whether a requester is authorized to view an article. An unauthenticated attacker who can access the endpoint and identify article IDs may retrieve content intended only for paid, logged-in, or member users, as well as draft content.
Affected context
The issue occurs in the ArticleRestController article detail endpoint, GET /article/api/data/detail/{articleId}. It is risky when the endpoint returns article details without verifying the requester's access rights and the article's visibility status. The described exposure includes paid, login-only, member-only, and draft articles.
Exploit preconditions
- Attack surface: The article detail API endpoint
- Required access: No authentication is required, according to the vulnerability description
- Trigger point: A request to the detail endpoint with an article ID
- Why exploitation is possible: The endpoint does not properly enforce authorization before returning restricted article content; article IDs may be enumerated
Why this happens
The underlying issue is missing authorization enforcement, mapped to CWE-862: Missing Authorization. The endpoint allows access to article details without adequately checking whether the requester is permitted to view the requested article. Authentication alone would not be sufficient if the article's specific visibility rules are not also enforced.
Potential impact
- Unauthenticated users may access paid or member-only content
- Private or login-restricted article content could be disclosed
- Draft material may be exposed before publication
- Content access controls and related business rules may be undermined
General mitigation guidance
Defensive patterns focus on enforcing authorization at the point where article data is retrieved or returned.
- Apply server-side access checks for every article detail request
- Evaluate the requester's identity, entitlements, and the article's visibility state
- Deny access by default when authorization cannot be established
- Avoid relying on hidden or difficult-to-guess article IDs as an access control
- Return only fields the requester is authorized to see
- Keep authorization logic consistent across API endpoints
How teams detect issues like this
- Review article detail handlers for authorization checks before data is returned
- Use static analysis or code review rules to flag data-access paths without access-control enforcement
- Test requests against articles with different visibility states, including unauthenticated requests
- Monitor for unusual sequences of requests across many article IDs
- Apply API policies that require explicit authorization for restricted content

