Submit #1080023: icereed paperless-gpt 0.31.0 Code Injectioninfo

Titleicereed paperless-gpt 0.31.0 Code Injection
Descriptionpaperless-gpt compiles caller-supplied text/template prompt sources with the full sprig function map. That map includes env and expandenv, which read the process environment. When a template fails at execution time, the raw text/template error — which quotes the value returned by the failing function — is formatted into the HTTP JSON response. Combining the two gives any network caller that can reach the HTTP port a one-request read of PAPERLESS_API_TOKEN and every other environment variable in the container, including LLM/OCR provider keys. /api/config deliberately withholds exactly these values, so this crosses a boundary the product itself draws
Source⚠️ https://gist.github.com/DReazer/4d3b662179e630c0a3943ad056e961fe
User
 Snkn0w (UID 90071)
Submission11/07/2026 11:58 (26 days ago)
Moderation12/03/2026 07:41 (26 days later)
StatusAccepted
VulDB entry448521 [Icereed paperless-gpt up to 0.31.0 ocr_prompt.go renderOCRPromptOverride special elements in template engine]
Points20

Interested in the pricing of exploits?

See the underground prices here!