ARTICLE

Hacking WhatsApp using an Image - How Hackers use images to hack targets

By Skills Uprise · 24 Jul 2026

Hacking WhatsApp using an Image

Understanding how image formats actually work, why they matter for security, and how attackers weaponize them — from everyday compression all the way to zero-click exploits.

.JPG .PNG .GIF .BMP .TIFF .WEBP .SVG .HEIC

8

MAJOR FORMATS

8

ATTACK VECTORS

2

ZERO-DAY CAMPAIGNS

01 · FUNDAMENTALS

What is an image file format?

A method of storing digital images so that computers know how to save, compress, and display them. When you shoot a photo or design a graphic, it has to be written in one of these formats.

Think of a format as a container with its own rules for packing pixels — trading off quality, file size, transparency, and motion. Pick the wrong one and you either bloat the file or lose the detail that matters.

Why do we have so many formats?

Each format is designed for a specific need — there is no single format that does everything well.

📦 Reduce storage space

💎 Preserve the highest quality

🫧 Support transparent backgrounds

🎬 Create animations

📏 Resize without losing quality

KEY INSIGHT

Instead of one format that tries to do everything (which would be inefficient), different formats were created for different jobs.

02 · COMPRESSION

Lossless vs Lossy

Every image is built from pixels — tiny dots that each store a color. Millions of them form the picture. Compression shrinks the file by removing or optimizing that pixel data.

● LOSSLESS

Nothing is lost

Original → compressed → recovered is exactly identical, pixel for pixel. Ideal when every detail counts.

USED BY · PNG · GIF · TIFF

Full quality — all pixels preserved

● LOSSY

Smaller, on purpose

Some detail the human eye barely notices is discarded. The image looks almost identical, but the file gets far smaller.

USED BY · JPEG · WEBP

~80% smaller — visually identical

03 · FORMAT DEEP DIVE

Every format, decoded

Each format is optimized for a specific job — here's what each one does best, and where it falls short. The two flagged in red are where security gets interesting.

📷

JPEG

Joint Photographic Experts Group

Best for: Photos, social media, the web

Lossy · No transparency · No animation

✓ Tiny files, supported everywhere

✗ Quality degrades on re-edit

🖼️

PNG

Portable Network Graphics

Best for: Logos, icons, screenshots, UI

Lossless · Transparency ✓ · No animation

✓ Crisp, transparent

✗ Larger than JPEG

🎞️

GIF

Graphics Interchange Format

Best for: Simple images & short animation

Lossless · Limited transparency · Animation ✓

✓ Animation, small size

✗ Poor color depth

🧱

BMP

Bitmap Image File

Best for: Editing, Windows internal graphics

No compression · No transparency

✓ Pixel-perfect accuracy

✗ Huge file size

🖨️

TIFF

Tagged Image File Format

Best for: Print, scanning, medical imaging

Lossless · Optional transparency

✓ Top quality, multi-page

✗ Very large files

🌐

WEBP

Google's modern web format

Best for: Modern websites

Lossy/Lossless · Transparency ✓ · Animation ✓

✓ Smaller than JPEG, versatile

✓ Transparency + motion

📐

SVG

Scalable Vector Graphics

Best for: Logos, icons, charts, maps

Vector · Transparency ✓ · Limited animation

✓ Infinite zoom, never blurry, tiny

⚠ XML-based — can contain JavaScript

📱

HEIC

High Efficiency Image Container

Best for: iPhone photos, Live Photos

Lossy · Transparency ✓ · No animation

✓ Smaller than JPEG, high quality

⚠ Auto-processed by Apple decoders

04 · QUICK REFERENCE

Format comparison at a glance

One table to settle the 'which format should I use?' question. On a phone each format stacks into its own compact block.

Format

Compression

Transparency

Animation

Best use

JPEG

Lossy

No

No

Photographs

PNG

Lossless

Yes

No

Logos, screenshots

GIF

Lossless

Limited

Yes

Animations

BMP

None

No

No

Raw image storage

TIFF

Lossless

Optional

No

Professional printing

WEBP

Lossy/Lossless

Yes

Yes

Modern websites

SVG

Vector

Yes

Limited

Logos, icons, scalable art

HEIC

Lossy

Yes

No

Smartphone photography

PRO TIP

Choose by use case — JPEG for photos, PNG for transparent graphics, WEBP for the modern web, SVG for anything that must scale, TIFF for print.

05 · ATTACK SURFACE

How attackers weaponize image files

An image is rarely 'just' an image. These are the eight techniques that turn an innocent-looking file into a delivery mechanism.

🎭

Social Engineering

Files named invoice.jpg or offer.jpeg earn trust and get clicked — the gateway to phishing and malicious sites.

💥

Image-Processing Exploits

Crafted images trigger bugs in libraries like libjpeg or ImageMagick to achieve remote code execution.

🫥

Steganography

Malware or commands hidden inside a normal-looking image. The picture is real; the payload is buried in it.

📜

SVG Abuse

SVG is XML and can carry JavaScript — enabling XSS the moment it's displayed unsanitized.

🪤

Double Extension

invoice.jpg.exe — Windows hides the final .exe, so the victim sees 'invoice.jpg' and runs malware.

🏷️

Metadata Abuse

URLs and commands hidden in EXIF/IPTC fields. Some malware even reads metadata for C2 communication.

🧬

Polyglot Files

One file is valid as both an image and another type (JavaScript, ZIP) — depending on what opens it.

📱

HEIC Exploitation

Crafted HEIC images hit decoder vulnerabilities, enabling zero-click attacks on Apple devices.

05 · ATTACK FLOWS

Anatomy of an image attack

The same four techniques, step by step. Switch between them to see how a harmless-looking file becomes a full compromise.

06 · REAL-WORLD ATTACKS

When it actually happened

Two documented campaigns show these aren't theoretical — SVG and HEIC are the current frontier of image-based attacks.

2025 · SVG PHISHING (FORTINET)

Malicious SVGs vs. Ukraine

Fortinet uncovered a phishing campaign targeting Ukrainian organizations that used malicious SVG files as the lure.

Email posing as the Ukrainian Police → SVG shows a fake Adobe Reader loading page → a hidden auto-redirect downloads a malicious ZIP → Amatera Stealer + PureMiner installed.


WHY IT WORKED

SVGs look harmless, are XML-based, and can embed iframes and links — ideal for slipping past email security filters.

2023 · BLASTPASS (CITIZEN LAB)

HEIC & Pegasus spyware

Citizen Lab found attackers using a crafted HEIC image to exploit Apple's ImageIO framework and install Pegasus spyware.

Malicious HEIC sent over iMessage → auto-processed by ImageIO → a bug in the HEIC decoder is triggered → RCE, Pegasus installed with zero user interaction.


WHY IT WORKED

HEIC is processed automatically on Apple devices. The flaw was in the decoding library, not the image — a true zero-click attack.

07 · DEFENSE

How to protect your systems

Defense is layered — filter at the edge, harden the processors, and never let a file's name or appearance decide whether it's safe.

📧

Email Filtering

Block executable files disguised as images before they reach the inbox.

🩹

Patch Image Libraries

Keep ImageMagick, libjpeg and friends updated to close known vulnerabilities.

🧼

SVG Sanitization

Strip <script> tags and unsafe HTML from every uploaded SVG.

✂️

Metadata Stripping

Remove EXIF/IPTC metadata from images users upload.

🔎

Extension Validation

Validate the actual file content — never trust the extension alone.

🎓

User Awareness

Train people to recognize suspicious image files and lures.

🕵️

Steganography Detection

Use tooling to detect hidden data buried inside images.

🛡️

Zero-Trust

Don't trust a file based on its extension or how it looks.

BEST PRACTICE

Never trust a file extension alone. Validate the actual content, strip metadata, sanitize SVGs, and keep your image-processing libraries patched.

08 · CONCLUSION

Image formats are an attack surface

Image files aren't just about storage — they're a genuine attack surface. From social engineering to zero-click exploits, attackers use them in remarkably sophisticated ways.

Understanding the formats, their weaknesses, and how they're abused is essential for security professionals. SVG and HEIC are the new frontier — with real campaigns already in the wild.

8×2

Formats & techniques

Eight formats, eight distinct abuse techniques — each format is a trade-off and a potential entry point.

2

New frontier

SVG and HEIC drove the two headline campaigns — modern formats, modern risk.

0

Clicks required

Zero-click attacks like BLASTPASS need no user action at all. Automation is the vulnerability.

09 · KNOWLEDGE CHECK

Test your understanding

Fifteen quick questions to check what stuck. Tap any question to reveal the answer.

What is the difference between lossy and lossless compression?
Lossy compression makes files smaller but discards some data; lossless compression makes files smaller with no data loss at all.
Which format supports transparent backgrounds?
PNG is the classic answer (WEBP, SVG and HEIC also support transparency). JPEG does not.
What is steganography in the context of image files?
Hiding malware or commands inside an image that otherwise looks completely normal.
Why is SVG considered a security risk?
SVG is XML-based and can contain JavaScript, which enables XSS attacks when the file is displayed without sanitization.
What makes HEIC images attractive to attackers?
They're automatically processed by Apple devices, so a crafted file can trigger decoder bugs — and HEIC can pack multiple images in one file.
What was the BLASTPASS attack?
A 2023 zero-click exploit that used a crafted HEIC image to install Pegasus spyware via Apple's ImageIO framework.
Which format is best for professional photography and printing?
TIFF — it's lossless, offers the highest quality, and supports multiple pages.
What is the double-extension trick?
Naming a file like invoice.jpg.exe so Windows hides the .exe and the victim believes it's just an image.
What type of compression does GIF use?
Lossless compression.
What is a polyglot file?
A file that behaves as both an image and another file type (such as JavaScript or ZIP), depending on which program opens it.
Which format was used in the 2025 Fortinet phishing campaign?
SVG — abused because it's XML-based and can embed links and iframes to bypass email filters.
What metadata do attackers often abuse in images?
EXIF/IPTC metadata — GPS coordinates, camera info, and hidden URLs or commands.
What is the primary advantage of the WEBP format?
Smaller files than JPEG while still supporting both transparency and animation.
What type of attack is the BLASTPASS exploit?
A zero-click attack — it requires no interaction from the victim.
What is the golden rule of image-file security?
Never trust a file by its extension or appearance — validate the content, strip metadata, sanitize SVGs, and keep libraries patched.

Image Formats & Security

Content derived from official documentation and real-world attack analysis. Built for cybersecurity professionals and IT administrators.

Read more articles →