Aias00 opened a new issue, #6811:
URL: https://github.com/apache/shenyu/issues/6811

   - severity: Low-Medium; files: 
`shenyu-plugin-ai/shenyu-plugin-ai-response-transformer/.../AiResponseTransformerPlugin.java:312-328`
   - description: `new GZIPInputStream(bis)` / `new ByteArrayOutputStream()` 
are closed only at lines 321-322 after the read loop; the `catch (Exception e)` 
at line 325 does not close them. `GZIPInputStream` owns a native `Inflater` 
(zlib); a truncated/corrupt gzip body throws and leaks the native decompression 
buffer until GC finalization. Sibling `LoggingConsolePlugin.decompressGzip` 
(`:306-316`) does this correctly with try-with-resources.
   - impact: Native (zlib Inflater) memory leak per failed gzip decompression.
   - suggested_fix: Wrap `gis`/`bos` in a single try-with-resources.
   - confidence: High
   - related_existing: SEC-9 covers unbounded decompression DoS (different 
defect — this is the not-closed-on-error leak).
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in 
[`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to