- severity: High
- files:
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-general-context/src/main/java/org/apache/shenyu/plugin/general/context/GeneralContextPlugin.java:54
- description:
doExecute calls obtainHandle(CacheKeyUtils.INST.getKey(rule)) and immediately dereferences .isEmpty() without a null check. CommonHandleCache.obtainHandle returns null on cache miss. Every other plugin in this set (ContextPathPlugin:55, RewritePlugin:68, etc.) guards with Objects.isNull(handle) before use; GeneralContextPlugin is the sole exception.
- impact: NullPointerException at runtime — request fails with 500 instead of passing through the chain.
- suggested_fix: Add
if (Objects.isNull(generalContextHandleMap) || generalContextHandleMap.isEmpty()) { return chain.execute(exchange); } before line 54.
- 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.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-general-context/src/main/java/org/apache/shenyu/plugin/general/context/GeneralContextPlugin.java:54doExecutecallsobtainHandle(CacheKeyUtils.INST.getKey(rule))and immediately dereferences.isEmpty()without a null check.CommonHandleCache.obtainHandlereturnsnullon cache miss. Every other plugin in this set (ContextPathPlugin:55, RewritePlugin:68, etc.) guards withObjects.isNull(handle)before use; GeneralContextPlugin is the sole exception.if (Objects.isNull(generalContextHandleMap) || generalContextHandleMap.isEmpty()) { return chain.execute(exchange); }before line 54.Identified during the 2026-08-02 deep re-scan; full list in
docs/scan2-2026-08-02/00-consolidated-critical-high.md.