Skip to content

fix(recovery): avoid leaking raw panic details to gRPC clients - #9

Open
mrnetwork0001 wants to merge 1 commit into
circlefin:mainfrom
mrnetwork0001:fix/panic-recovery-leak
Open

fix(recovery): avoid leaking raw panic details to gRPC clients#9
mrnetwork0001 wants to merge 1 commit into
circlefin:mainfrom
mrnetwork0001:fix/panic-recovery-leak

Conversation

@mrnetwork0001

Copy link
Copy Markdown

Summary

This PR fixes an information disclosure vulnerability in the gRPC panic recovery interceptor where raw panic values (which can include stack traces, variable values, file paths, or memory addresses) were being returned directly to the client in the gRPC error response.

Changes

  • Updated the gRPC unary recovery interceptor in internal/common/grpc/server/interceptor/recovery.go to return a generic "something went wrong" message instead of formatting the panic value %v.
  • Updated unit tests in internal/common/grpc/server/interceptor/recovery_test.go to assert that the client error message is generic and does not leak the raw panic details/value.

Testing

  • Verified that all unit tests in internal/common/grpc/server/interceptor pass locally.

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