Loading...
Skip to main content

CVE-2025-68618

MEDIUM

ImageMagick's failure to limit the depth of SVG file reads caused a DoS attack

Published December 30, 2025Updated February 4, 2026Source: osv

Summary

### Summary Using Magick to read a malicious SVG file resulted in a DoS attack. ### Details bt obtained using gdb: ``` #4 0x0000555555794c9c in ResizeMagickMemory (memory=0x7fffee203800, size=391344) at MagickCore/memory.c:1443 #5 0x0000555555794e5a in ResizeQuantumMemory (memory=0x7fffee203800, count=48918, quantum=8) at MagickCore/memory.c:1508 #6 0x0000555555acc8ed in SVGStartElement (context=0x517000000080, name=0x5190000055e3 "g", attributes=0x0) at coders/svg.c:1254 #7 0x00007ffff6799b1c in xmlParseStartTag () at /lib/x86_64-linux-gnu/libxml2.so.2 #8 0x00007ffff68c7bb8 in () at /lib/x86_64-linux-gnu/libxml2.so.2 #9 0x00007ffff67a03f1 in xmlParseChunk () at /lib/x86_64-linux-gnu/libxml2.so.2 ``` This is related to the SVGStartElement and ResizeQuantumMemory functions. ### PoC 1. Generate an SVG file 2. Read this file using Magick: ``` ./magick /data/ylwang/Tools/LargeScan/targets/ImageMagick/test++/1.svg null ``` 3. Causes a DoS Attack My server has a large amount of memory, causing a stack overflow to take a long time. I'll use the Windows release version as an example: ``` PS C:\Program Files\ImageMagick-7.1.2-Q8> .\magick.exe -ping 1.svg null: PS C:\Program Files\ImageMagick-7.1.2-Q8> echo $LASTEXITCODE -1073741571 ``` The error code -1073741571 indicates a crash due to a stack overflow. ### Impact This is a DoS vulnerability and all applications using Magick to parse SVG files are affected.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update Magick.NET-Q8-OpenMP-arm64 to 14.10.1 or later
dotnet add package Magick.NET-Q8-OpenMP-arm64 --version 14.10.1
NuGet
Update Magick.NET-Q16-x86 to 14.10.1 or later
dotnet add package Magick.NET-Q16-x86 --version 14.10.1
NuGet
Update Magick.NET-Q16-arm64 to 14.10.1 or later
dotnet add package Magick.NET-Q16-arm64 --version 14.10.1
NuGet
Update Magick.NET-Q16-HDRI-OpenMP-arm64 to 14.10.1 or later
dotnet add package Magick.NET-Q16-HDRI-OpenMP-arm64 --version 14.10.1
NuGet
Update Magick.NET-Q8-x86 to 14.10.1 or later
dotnet add package Magick.NET-Q8-x86 --version 14.10.1
NuGet
Update Magick.NET-Q8-AnyCPU to 14.10.1 or later
dotnet add package Magick.NET-Q8-AnyCPU --version 14.10.1
NuGet
Update Magick.NET-Q16-HDRI-arm64 to 14.10.1 or later
dotnet add package Magick.NET-Q16-HDRI-arm64 --version 14.10.1
NuGet
Update Magick.NET-Q16-HDRI-OpenMP-x64 to 14.10.1 or later
dotnet add package Magick.NET-Q16-HDRI-OpenMP-x64 --version 14.10.1
NuGet
Update Magick.NET-Q16-AnyCPU to 14.10.1 or later
dotnet add package Magick.NET-Q16-AnyCPU --version 14.10.1
NuGet
Update Magick.NET-Q16-OpenMP-arm64 to 14.10.1 or later
dotnet add package Magick.NET-Q16-OpenMP-arm64 --version 14.10.1
NuGet
Update Magick.NET-Q16-HDRI-x64 to 14.10.1 or later
dotnet add package Magick.NET-Q16-HDRI-x64 --version 14.10.1
NuGet
Update Magick.NET-Q16-HDRI-AnyCPU to 14.10.1 or later
dotnet add package Magick.NET-Q16-HDRI-AnyCPU --version 14.10.1
NuGet
Update Magick.NET-Q16-HDRI-x86 to 14.10.1 or later
dotnet add package Magick.NET-Q16-HDRI-x86 --version 14.10.1
NuGet
Update Magick.NET-Q8-OpenMP-x64 to 14.10.1 or later
dotnet add package Magick.NET-Q8-OpenMP-x64 --version 14.10.1
NuGet
Update Magick.NET-Q16-OpenMP-x64 to 14.10.1 or later
dotnet add package Magick.NET-Q16-OpenMP-x64 --version 14.10.1
NuGet
Update Magick.NET-Q16-x64 to 14.10.1 or later
dotnet add package Magick.NET-Q16-x64 --version 14.10.1
NuGet
Update Magick.NET-Q8-arm64 to 14.10.1 or later
dotnet add package Magick.NET-Q8-arm64 --version 14.10.1

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (17)

PackageEcosystemAffectedFixed In
Magick.NET-Q8-OpenMP-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+48 more)14.10.1
Magick.NET-Q16-x86
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+219 more)14.10.1
Magick.NET-Q16-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+48 more)14.10.1
Magick.NET-Q16-HDRI-OpenMP-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+48 more)14.10.1
Magick.NET-Q8-x86
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+219 more)14.10.1
Magick.NET-Q8-AnyCPU
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+203 more)14.10.1
Magick.NET-Q16-HDRI-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+48 more)14.10.1
Magick.NET-Q16-HDRI-OpenMP-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+100 more)14.10.1
Magick.NET-Q16-AnyCPU
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+203 more)14.10.1
Magick.NET-Q16-OpenMP-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+48 more)14.10.1
Magick.NET-Q16-HDRI-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+200 more)14.10.1
Magick.NET-Q16-HDRI-AnyCPU
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+200 more)14.10.1
Magick.NET-Q16-HDRI-x86
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+200 more)14.10.1
Magick.NET-Q8-OpenMP-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+100 more)14.10.1
Magick.NET-Q16-OpenMP-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+100 more)14.10.1
Magick.NET-Q16-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+219 more)14.10.1
Magick.NET-Q8-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+48 more)14.10.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Frequently Asked Questions

What is CVE-2025-68618?
ImageMagick's failure to limit the depth of SVG file reads caused a DoS attack This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
How do I check if my project is affected by CVE-2025-68618?
CVE-2025-68618 affects Magick.NET-Q8-OpenMP-arm64, Magick.NET-Q16-x86 and Magick.NET-Q16-arm64 (and 14 more). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-68618 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.3

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-p27m-hp98-6637

Related CVEs

  • CVE-2026-40169
    MEDIUM

    ImageMagick has a heap buffer overflow (WRITE) in the YAML and JSON encoders.

  • CVE-2026-31853
    MEDIUM

    ImageMagick is vulnerable to heap buffer over-write on 32-bit systems in SFW decoder

  • CVE-2026-30931
    MEDIUM

    ImageMagick has heap-based buffer overflow in UHDR encoder

  • GHSA-hc76-7mpc-qjqh
    MEDIUM

    ImageMagick: Code injection in HTML encoder due to incomplete fix of CVE-2026-25797

  • CVE-2026-24484
    MEDIUM

    ImageMagick: Converting multi-layer nested MVG to SVG can cause DoS

  • CVE-2026-61866
    LOW

    ImageMagick: Memory Leak in JNG encoder when a blob could not be opened

  • CVE-2026-56361
    LOW

    ImageMagick has has an off-by-one origin validation in allows out-of-bounds read in morphology processing

  • CVE-2026-56378
    LOW

    ImageMagick: Malicious PCD files trigger 1‑byte heap Out-of-bounds Read and DoS

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies