Skip to content

Security: Sensitive Data Exposure in Error Response#238

Open
tomaioo wants to merge 1 commit into
TangleML:masterfrom
tomaioo:fix/security/sensitive-data-exposure-in-error-respons
Open

Security: Sensitive Data Exposure in Error Response#238
tomaioo wants to merge 1 commit into
TangleML:masterfrom
tomaioo:fix/security/sensitive-data-exposure-in-error-respons

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented May 15, 2026

Summary

Security: Sensitive Data Exposure in Error Response

Problem

Severity: High | File: api_server_main.py:L36

In api_server_main.py, the exception handler returns full stack traces (traceback.format_exception) in the JSON response to clients. This exposes internal application details, file paths, and potentially sensitive configuration information.

Solution

Return a generic error message to clients in production. Only log the full stack trace server-side. Consider using a separate error code that clients can use to look up details in documentation or a separate logging system.

Changes

  • api_server_main.py (modified)

In api_server_main.py, the exception handler returns full stack traces (traceback.format_exception) in the JSON response to clients. This exposes internal application details, file paths, and potentially sensitive configuration information.

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
@tomaioo tomaioo requested a review from Ark-kun as a code owner May 15, 2026 18:10
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