Skip to content

[BUG] NPE/IndexOutOfBoundsException when request param is null or empty #6651

Description

@Aias00
  • severity: High
  • files: shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-grpc/src/main/java/org/apache/shenyu/plugin/grpc/client/ShenyuGrpcClient.java:75,81
  • description: When parameterTypes is blank, param can be null and execution reaches client.call(). Inside call(), line 75 GsonUtils.getInstance().toObjectMap(requestJsons) with null returns null; JsonMessage.buildJsonMessageList(null) NPEs. Even if it returns an empty list, line 81 jsonRequestList.get(0) throws IndexOutOfBoundsException.
  • impact: gRPC methods with no parameter types crash with an uncaught exception instead of being proxied.
  • suggested_fix: Handle null/blank requestJsons by building a single default empty DynamicMessage.
  • confidence: High
  • related_existing: none

Identified during the 2026-08-02 deep re-scan; full list in docs/scan2-2026-08-02/00-consolidated-critical-high.md.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions