{"id":"GHSA-jgpv-4h4c-xhw3","kind":"vulnerability","aliases":["GHSA-jgpv-4h4c-xhw3"],"related":[],"title":"Duplicate Advisory: Uncontrolled Resource Consumption in pillow","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-f4w8-cv6p-x6r5. This link is maintained to preserve external references.\n\n## Original Description\n### Impact\n_Pillow before 8.1.1 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for a BLP container, and thus an attempted memory allocation can be very large._\n\n### Patches\n_An issue was discovered in Pillow before 6.2.0. When reading specially crafted invalid image files, the library can either allocate very large amounts of memory or take an extremely long period of time to process the image._\n\n### Workarounds\n_An issue was discovered in Pillow before 6.2.0. When reading specially crafted invalid image files, the library can either allocate very large amounts of memory or take an extremely long period of time to process the image._\n\n### References\nhttps://nvd.nist.gov/vuln/detail/CVE-2021-27921\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)","summary":"Pillow before 8.1.1 does not check the declared size of an image inside a BLP container, so an attempted memory allocation can be very large. An attacker who supplies a crafted image can exhaust memory and crash the process that reads it.","severity":"high","cvss":7.5,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"pillow","fixed":["8.1.2"],"affected":"< 8.1.1","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["cwe-400","package","pillow","python","self-hosted"],"not_affected_if":["pillow-8.1.2-or-later","trusted-input-only"],"how_to_check":"- `pip show pillow` and confirm the version is below `8.1.1`\n- Search the project for `PIL.Image.open` or `Image.open` calls that read untrusted uploads","fix":"- Upgrade pillow to `8.1.2` or later, the fixed version named in the source\n- This advisory is withdrawn as a duplicate of GHSA-f4w8-cv6p-x6r5; track that advisory for the canonical record","status":"withdrawn","published_at":"2021-04-23T16:54:36+00:00","first_seen_at":"2026-10-27T19:04:56+00:00","triaged_at":"2026-10-27T19:05:59+00:00","updated_at":"2026-10-27T19:05:59+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-27T19:05:59Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade pillow to `8.1.2` or later, the fixed version named in the source\n- This advisory is withdrawn as a duplicate of GHSA-f4w8-cv6p-x6r5; track that advisory for the canonical record","reach":"internet","title":"Pillow: crafted BLP image triggers huge memory allocation, denial of service","impact":"medium","summary":"Pillow before 8.1.1 does not check the declared size of an image inside a BLP container, so an attempted memory allocation can be very large. An attacker who supplies a crafted image can exhaust memory and crash the process that reads it.","category":"package","nicknames":[],"who_cares":["python","pillow","self-hosted"],"confidence":0.6,"needs_auth":"no","worst_case":"Attacker crashes the process by exhausting its memory","analyst_note":"","how_to_check":"- `pip show pillow` and confirm the version is below `8.1.1`\n- Search the project for `PIL.Image.open` or `Image.open` calls that read untrusted uploads","needs_analyst":false,"not_affected_if":["trusted-input-only","pillow-8.1.2-or-later"],"who_is_affected":"Any application that uses Pillow before `8.1.1` to open image files it does not fully trust, such as user uploads or images fetched from external URLs, is exposed. Services that only process images they generated or that come from a trusted source are less exposed. Teams not reading untrusted BLP files can skip it.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000637,"input_tokens":3650,"output_tokens":543,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-400':20B '/vuln/detail/cve-2021-27921':215C '4h4c':11A,16A '6.2.0':144C,182C '8.1.1':29B,99C 'address':243C 'advisori':2A,69C,71C,228C 'alloc':47B,131C,156C,194C 'allow':100C 'amount':159C,197C 'attack':53B,101C 'attempt':45B,129C 'blp':41B,124C 'caus':103C 'check':32B,121C 'comment':225C 'consumpt':5A,109C 'contain':42B,116C,125C 'craft':57B,148C,186C 'crash':63B 'cv6p':84C 'cwe':19B 'declar':34B 'denial':105C 'descript':95C 'discov':140C,178C 'duplic':1A,68C,79C 'either':155C,193C 'email':238C,242C 'exampl':233C,241C 'example.com':237C 'example@example.com':245C 'exhaust':60B 'extern':92C 'extrem':165C,203C 'f4w8':83C 'file':151C,189C 'ghsa':9A,14A,82C 'ghsa-f4w8-cv6p-x6r5':81C 'ghsa-jgpv-4h4c-xhw3':8A,13A 'host':26B 'imag':38B,58B,117C,150C,188C 'image._':173C,211C 'impact':96C 'inform':218C 'insid':39B 'invalid':149C,187C 'issu':138C,176C,231C 'jgpv':10A,15A 'larg':51B,158C,196C 'large._':135C 'librari':153C,191C 'link':87C,234C 'long':166C,204C 'mailto':244C 'maintain':89C 'memori':46B,61B,108C,130C,161C,199C 'nvd.nist.gov':214C 'nvd.nist.gov/vuln/detail/cve-2021-27921':213C 'open':229C 'origin':94C 'packag':21B 'patch':136C 'period':167C,205C 'pillow':7A,18A,22B,27B,97C,142C,180C 'preserv':91C 'process':65B,171C,209C 'proper':120C 'python':23B 'question':223C 'read':67B,146C,184C 'refer':93C,212C 'repo':236C 'report':112C 'resourc':4A 'self':25B 'self-host':24B 'servic':107C 'size':35B,113C 'special':147C,185C 'suppli':55B 'take':163C,201C 'thus':127C 'time':169C,207C 'uncontrol':3A 'us':239C 'withdrawn':74C 'workaround':174C 'x6r5':85C 'xhw3':12A,17A","nicknames":[],"mitigations":[],"who_affected":"Any application that uses Pillow before `8.1.1` to open image files it does not fully trust, such as user uploads or images fetched from external URLs, is exposed. Services that only process images they generated or that come from a trusted source are less exposed. Teams not reading untrusted BLP files can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2021-04-23T16:54:36+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-jgpv-4h4c-xhw3","url":"https://github.com/advisories/GHSA-jgpv-4h4c-xhw3","severity":"high","published_at":"2021-04-23T16:54:36+00:00","modified_at":"2026-10-27T19:00:29+00:00","first_seen_at":"2026-10-27T19:04:56+00:00","fetched_at":"2026-10-27T19:04:56+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}