Skip to content

fix(http): default 500 response leaks err.message across all three backends #356

Description

@pathosDev

The default error mapping in all three backends serializes the thrown error's message into the 500 response body:

  • FastifyBackend.writeError
  • ExpressBackend error middleware
  • HonoBackend app.onError

For non-HttpError throws this leaks internal details (stack-adjacent messages, driver errors, file paths) to clients — an information-disclosure wart.

Fix

Should land before 1.0. Add a Security CHANGELOG entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: mediumUseful, not urgentsecuritySecurity-relevant — see severity label for impact tierseverity: lowMinor / informational / mitigated-by-design

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions