Skip to content

Security: State-changing GET endpoint is marked NoCSRFRequired and can be abused for CSRF-driven storage spam#8212

Open
tomaioo wants to merge 1 commit intonextcloud:mainfrom
tomaioo:fix/security/state-changing-get-endpoint-is-marked-no
Open

Security: State-changing GET endpoint is marked NoCSRFRequired and can be abused for CSRF-driven storage spam#8212
tomaioo wants to merge 1 commit intonextcloud:mainfrom
tomaioo:fix/security/state-changing-get-endpoint-is-marked-no

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented Apr 25, 2026

Summary

Security: State-changing GET endpoint is marked NoCSRFRequired and can be abused for CSRF-driven storage spam

Problem

Severity: Medium | File: lib/Controller/ViewController.php:L70

getCalendarDotSvg is documented as @NoCSRFRequired and performs a write operation (newFile) in app data based on request input. Because this is a GET-style retrieval endpoint with side effects, a third-party site can trigger authenticated users' browsers to hit it repeatedly, causing unwanted file creation and potential storage exhaustion/DoS.

Solution

Make the endpoint side-effect free (serve generated SVG directly without persisting), or require POST with CSRF protection for writes. Add rate limiting and cleanup/overwrite logic to prevent unbounded file growth.

Changes

  • lib/Controller/ViewController.php (modified)

`getCalendarDotSvg` is documented as `@NoCSRFRequired` and performs a write operation (`newFile`) in app data based on request input. Because this is a GET-style retrieval endpoint with side effects, a third-party site can trigger authenticated users' browsers to hit it repeatedly, causing unwanted file creation and potential storage exhaustion/DoS.

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant