Skip to content

fix(security): 2 improvements across 1 files#1999

Open
tomaioo wants to merge 1 commit into
aws:mainfrom
tomaioo:fix/security/information-disclosure-in-error-handling
Open

fix(security): 2 improvements across 1 files#1999
tomaioo wants to merge 1 commit into
aws:mainfrom
tomaioo:fix/security/information-disclosure-in-error-handling

Conversation

@tomaioo

@tomaioo tomaioo commented Jul 24, 2026

Copy link
Copy Markdown

Summary

fix(security): 2 improvements across 1 files

Problem

Severity: Medium | File: packages/graph-explorer-proxy-server/src/error-handler.ts:L79

The extractErrorInfo function returns error.message directly for generic Error instances. If an unexpected internal error occurs (e.g., database driver crash, file system error), internal implementation details, stack traces, or sensitive context could be leaked to the client in the HTTP response.

Solution

For generic Error instances (500 status codes), return a generic message like "Internal Server Error" to the client, and log the actual error.message internally. Only expose specific messages for expected HttpError instances.

Changes

  • packages/graph-explorer-proxy-server/src/error-handler.ts (modified)

- Security: Information Disclosure in Error Handling
- Security: Potential Sensitive Header Logging

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