Summary
A missing authorization check in the calibre Content Server allows annotation updates to be written without verifying that the requester has database write permission. A read-only or anonymous user on an unauthenticated deployment may therefore persist unauthorized changes to book annotations.
Affected context
The issue occurs in calibre Content Server deployments where the book annotation update endpoint is exposed and request handling does not require an explicit database-write authorization check. The risk is greater when anonymous access is enabled or when users with read-only permissions can reach the endpoint.
Exploit preconditions
- Attack surface: The calibre Content Server book annotation update endpoint
- Required access: A read-only account, or no authentication when the deployment permits anonymous access
- Trigger point: Processing an annotation update request for a book and format
- Why exploitation is possible: The endpoint does not mark the operation as requiring database write access, so dispatch logic can skip the authorization check before persisting attacker-controlled annotation data
Why this happens
The endpoint invokes a state-changing database operation without declaring that database write authorization is required. As a result, request dispatch can bypass the normal permission check before the annotation data reaches the persistence layer. This is a missing authorization control mapped to CWE-862, where an application fails to enforce access control for a protected operation.
Potential impact
- An unauthorized user may modify book annotations
- A read-only account may gain an unintended write capability
- An anonymous requester may alter library metadata when unauthenticated access is enabled
- Annotation integrity and user trust may be reduced
- Downstream workflows relying on annotations could be affected
General mitigation guidance
Mitigation generally focuses on enforcing authorization consistently for every
state-changing operation.
Common defensive patterns include:
- Requiring an explicit database-write permission check before annotation updates
- Applying authorization at a centralized dispatch or service boundary
- Treating all client-supplied annotation data as untrusted
- Using deny-by-default access controls for anonymous and read-only identities
- Separating read and write endpoints and enforcing the appropriate policy on each
- Running the service with only the minimum permissions needed for its deployment
- Testing authorization behavior for authenticated, read-only, and anonymous request contexts
How teams detect issues like this
Organizations can detect similar issues through:
- Static analysis that identifies state-changing handlers lacking authorization guards
- Code review checks for endpoint metadata that does not match the operation's write behavior
- Tests asserting that anonymous and read-only users cannot invoke mutation paths
- Policy enforcement requiring authorization checks at service or router boundaries
- Monitoring for unexpected annotation changes by read-only or anonymous identities
- Automated security review tools that trace request data into persistence operations

