Skip to content

Security: Internal exception messages are returned to clients#4634

Open
tomaioo wants to merge 1 commit intonextcloud:mainfrom
tomaioo:fix/security/internal-exception-messages-are-returned
Open

Security: Internal exception messages are returned to clients#4634
tomaioo wants to merge 1 commit intonextcloud:mainfrom
tomaioo:fix/security/internal-exception-messages-are-returned

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented Apr 24, 2026

Summary

Security: Internal exception messages are returned to clients

Problem

Severity: Low | File: lib/Controller/BaseController.php:L47

The base controller returns raw exception messages in HTTP responses (['message' => $e->getMessage()]). If exception text contains internal details (query context, identifiers, stack-related hints), this can expose sensitive implementation information to attackers.

Solution

Return generic user-facing error messages and log detailed exception information server-side only. Map known exceptions to stable, sanitized error codes/messages.

Changes

  • lib/Controller/BaseController.php (modified)

The base controller returns raw exception messages in HTTP responses (`['message' => $e->getMessage()]`). If exception text contains internal details (query context, identifiers, stack-related hints), this can expose sensitive implementation information to attackers.

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