File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,13 +189,12 @@ Opening an EPS file invokes the system Ghostscript binary (``gs``) via
189189``subprocess ``. Ghostscript has a long history of sandbox-escape CVEs
190190permitting arbitrary code execution from malicious PostScript.
191191
192- *Mitigations: * **block EPS files ** at the application input layer; if EPS must
193- be supported, run Ghostscript in a fully isolated sandbox with no network and
194- no sensitive mounts; unregister the plugin if unused::
195-
196- from PIL import Image, EpsImagePlugin
197- Image.OPEN.pop("EPS", None)
198-
192+ *Mitigations: * **block EPS files ** at the application input layer before
193+ passing files to Pillow; if EPS must be supported, run Ghostscript in a fully
194+ isolated sandbox with no network and no sensitive mounts. Pillow does not
195+ provide a stable public API for unregistering individual format plugins, so do
196+ not rely on mutating internal registries such as ``Image.OPEN `` as a security
197+ control.
199198**E-3 — ``ImageMath.unsafe_eval()`` code injection **
200199
201200:py:meth: `~PIL.ImageMath.unsafe_eval ` calls Python's built-in ``eval() `` with
You can’t perform that action at this time.
0 commit comments