#1150224 imagemagick: regression in bookworm security updates: SVG <image> with data: URI fails ("unable to open image")

Package:
imagemagick
Source:
imagemagick
Description:
image manipulation programs -- binaries
Submitter:
Guillaume Bihet
Date:
2026-10-30 14:49:02 UTC
Severity:
normal
#1150224#5
Date:
2026-10-07 10:37:16 UTC
From:
To:
Dear Maintainer,

Converting an SVG that includes a PNG image through a data: URI fails on
deb12u13

Steps to reproduce:

The attached image min.svg is a minimal SVG containing a single <image>
element whose href is a data: URI (a small PNG).

Command line :
$   convert min.svg out.png

Observed with 8:6.9.11.60+dfsg-1.6+deb12u13:
`image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKAQMAAAC3/F3+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABlBMVEX/AAD///9BHTQRAAAAAWJLR0QB/wIt3gAAAAd0SU1FB+oKBwkDHJyRhl8AAAALSURBVAjXY2DABwAAHgABboVHMgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNi0xMC0wN1QwOTowMzoyOCswMDowMPubB7AAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjYtMTAtMDdUMDk6MDM6MjgrMDA6MDCKxr8MAAAAAElFTkSuQmCC':
No such file or directory @ error/blob.c/OpenBlob/2990.
error/convert.c/ConvertImageCommand/3234.

Expected: out.png is written. The same command works with deb12u4 and
deb12u6 but fails with deb12u11 and deb12u13, so the regression was likely
introduced between deb12u6 and deb12u11

System information:
  Debian 12 (bookworm), amd64
  Kernel: Linux 6.1.0-34-amd64 Debian 6.1.135-1
  libc6: 2.36-9+deb12u14
  rsvg-convert is not installed


*Guillaume Bihet*
immateriel technical team

#1150224#10
Date:
2026-10-07 12:00:21 UTC
From:
To:
Le mercredi 7 octobre 2026, 12:37:16 heure d’été d’Europe centrale Guillaume Bihet a écrit :

Does removing policy hardening work ?

Could you change policy.xml to allow all coder.

If so it is a feature not a bug, we blocker url due to potential security impact.
it is up to sysadmin to unblock, after risk analysis

If not they are another suspect but could you please try the policy fix


rouca

#1150224#15
Date:
2026-10-07 13:03:19 UTC
From:
To:
Hi,

Thank you for your quick answer, I tried with no policy at all but I get
the same error with deb12u13:

$ sudo mv /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.bak

$ convert -list policy
   Policy: Undefined
     rights: None

$ convert min.svg out.png
`image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKAQMAAAC3/F3+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABlBMVEX/AAD///9BHTQRAAAAAWJLR0QB/wIt3gAAAAd0SU1FB+oKBwkDILP++tgAAAALSURBVAjXY2DABwAAHgABboVHMgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNi0xMC0wN1QwOTowMzozMiswMDowMJNBWGAAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjYtMTAtMDdUMDk6MDM6MzIrMDA6MDDiHODcAAAAAElFTkSuQmCC':
No such file or directory @ error/blob.c/OpenBlob/2990.
error/convert.c/ConvertImageCommand/3234.

Doesn't seem to be policy-related...

Best regards,

Guillaume

Guillaume Bihet
immatériel technical team

Le mer. 7 oct. 2026 à 14:00, Bastien Roucaries <rouca@debian.org> a écrit :

#1150224#20
Date:
2026-10-08 22:22:50 UTC
From:
To:
Le mercredi 7 octobre 2026, 15:03:19 heure d’été d’Europe centrale Guillaume Bihet a écrit :

Look like
https://github.com/imagemagick/ImageMagick/issues/8803

Could you try, if i post a patch and salsa and upload a private package ?

rouca

#1150224#25
Date:
2026-10-09 10:23:25 UTC
From:
To:
Hi,

Yes, it looks like it's exactly the same issue.

I can test a package on my local deb12u13 test environment where I have the
bug.

Thanks,
Guillaume



Le ven. 9 oct. 2026 à 00:22, Bastien Roucaries <rouca@debian.org> a écrit :

#1150224#30
Date:
2026-10-09 15:21:49 UTC
From:
To:
Le vendredi 9 octobre 2026, 12:23:25 heure d’été d’Europe centrale Guillaume Bihet a écrit :

I will first upload to trixie then fix the bookworm regression

rouca

#1150224#41
Date:
2026-10-28 10:18:30 UTC
From:
To:
Le vendredi 9 octobre 2026, 12:23:25 heure normale d’Europe centrale Guillaume Bihet a écrit :

Done normally I release a new bookworm version

#1150224#46
Date:
2026-10-28 11:30:46 UTC
From:
To:
Hi,

I confirm that the new bookworm version fixes the issue.
Thanks for the quick fix!


Le mer. 28 oct. 2026 à 11:18, Bastien Roucaries <rouca@debian.org> a écrit :

#1150224#51
Date:
2026-10-30 14:47:06 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
imagemagick, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1150224@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bastien Roucariès <rouca@debian.org> (supplier of updated imagemagick package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 23 Oct 2026 21:46:42 +0200
Source: imagemagick
Architecture: source
Version: 8:7.1.1.43+dfsg1-1+deb13u13
Distribution: trixie-security
Urgency: medium
Maintainer: ImageMagick Packaging Team <pkg-gmagick-im-team@lists.alioth.debian.org>
Changed-By: Bastien Roucariès <rouca@debian.org>
Closes: 1147176 1149974 1150224 1150337
Changes:
 imagemagick (8:7.1.1.43+dfsg1-1+deb13u13) trixie-security; urgency=medium
 .
   * Security fixes (Closes: #1147176, #1149974, #1150337)
   * Fix regression of CVE-2026-25971:
     SVG <image> with data: URI fails ("unable to open image")
     (Closes: #1150224)
   * Port distribute cache to 7.1.2.33
   * Port coders/mat.c to 7.1.2.33
   * Fix CVE-2026-62343:
     An invalid kernel can cause a heap buffer over-write
     when performing a morphology operation with a user supplied kernel.
   * Fix CVE-2026-62946:
     Processing an extremely large JNX file on 32-bit platforms
     can cause an integer overflow, leading to a heap buffer over-write.
   * Fix CVE-2026-62363:
     A heap buffer over-write can occur in the fx operation by
     passing a crafted argument.
   * Fix CVE-2026-64685:
     The BGR decoder does not check for an end-of-file in every location
     so a crafted image could result in an heap buffer over-read.
   * Fix CVE-2026-86420:
     Imagemagick fails to properly lower the memory budget when
     an operation inside OpenPixelCache fails. Repeated triggering
     of such failures can exhaust the process memory budget and
     result in a denial of service.
   * Fix CVE-2026-86421
     Fix a memory leak in the MSL image decoder.
     A crafted MSL image triggers memory allocation
     without proper deallocation, allowing an attacker to
     exhaust memory and cause a denial of service.
   * Fix CVE-2026-86423:
     a heap-use-after-free vulnerability in the GetList method
     of PerlMagick. A crafted call to the GetList method can
     trigger the use-after-free, resulting in a crash
     (denial of service).
   * Fix CVE-2026-86424:
     A time-of-check-time-of-use (TOCTOU) vulnerability in the video
     decoder that allows attackers to bypass path policy write
     restrictions via symlink swaps
   * Fix CVE-2026-86425:
     A heap-use-after-free vulnerability in the Layer method of PerlMagick.
   * Fix CVE-2026-93586:
     A use-after-free vulnerability in the ImagesToBlob method, caused by a
     pointer that is not updated correctly. Exploitation may result in
     a limited availability impact (e.g., a crash of the affected process).
   * Fix CVE-2026-93587:
     A policy bypass in the PCD (and, per the upstream advisory, CUBE and HALD)
     coder: when a specific command line option is supplied, the decoder
     does not check a configured resource limit, which can result
     in extra memory allocation.
   * Fix CVE-2026-93588:
     a NULL pointer dereference in the PNM coder. When the coder reaches
     a memory (resource) limit at a specific point during processing,
     the failed allocation is not handled and a NULL pointer is dereferenced,
     which can lead to a denial of service (application crash) when
     processing a specially crafted or sufficiently large PNM image.
   * Fix CVE-2026-93589:
     A division-by-zero flaw in the FLIF encoder. An incorrect value for
     ticks per second in the image being encoded causes a divide-by-zero
     and crashes the encoder, resulting in a denial of service.
   * Fix CVE-2026-93590:
     a policy bypass vulnerability in the UHDR encoder that fails
     to perform policy checks during buffer allocation for image pixels.
     Attackers can bypass resource policies by processing specially crafted
     UHDR images, potentially causing denial of service through
     excessive memory allocation.
   * Fix CVE-2026-102635:
     imagemagick contain uninitialized heap memory disclosure in the GIF
     decoder's application extension handler in coders/gif.c.
     Attackers can craft malicious GIF files that cause the number
     parser to read uninitialized heap memory and store contents
     as image metadata, disclosing sensitive heap information.
   * Fix CVE-2026-106564:
     A crafted EXR image can cause the EXR decoder to write beyond a
     heap buffer, causing the process to crash.
   * Fix CVE-2026-106565:
     A missing end-of-file check while reading bzip2-compressed
     image data can cause an infinite loop and exhaust processing resources.
   * Fix CVE-2026-106566:
     Delegate symlink cleanup does not check the MAGICK_SHRED_PASSES
     environment variable, allowing a local privileged workflow to
     overwrite a file with random data.
   * Fix CVE-2026-106567:
     A crafted PSD file can trigger an integer-conversion error
     in the PSD decoder on 32-bit builds, causing an infinite
     loop and denial of service.
   * Fix CVE-2026-106568:
     A crafted XMP profile embedded in an image can cause
     the profile parser to enter an infinite loop, preventing image
     processing from completing.
   * Fix CVE-2026-106570:
     An unauthenticated adjacent-network client can repeatedly connect
     to the distributed pixel cache server and exhaust its available
     connections, causing denial of service.
   * Fix CVE-2026-106571:
     A crafted local call to the GetVirtualPixels API can trigger
     an integer calculation error and write beyond a heap buffer,
     crashing the server process.
   * Fix CVE-2026-106572:
     A missing recursion-depth check in the CALS decoder
     allows a crafted CALS image to exhaust the call stack
     and terminate the process.
   * Fix CVE-2026-106573:
     a missing limit check in the MVG decoder allows a crafted MVG
     image to trigger an excessively long-running operation.
   * Fix CVE-2026-106574:
     A client connected to the distributed pixel cache server
     can send crafted pixel data that triggers an integer-size
     calculation error and a heap buffer overwrite, crashing the server.
   * Fix CVE-2026-106575:
     A crafted Magick script can cause an opened file pointer
     to remain unclosed, allowing repeated processing to exhaust
     available file descriptors
   * Fix CVE-2026-106576:
     A crafted XMP profile can trigger excessive work while the
     parser determines a rational value's numerator and denominator,
     causing denial of service
   * Fix CVE-2026-106577:
     Unescaped or untrimmed values can inject code into output
     generated by PostScript coders.
   * Fix CVE-2026-106578:
     A crafted image can cause an invalid memory free in the
     MVG decoder and crash the process
   * Fix CVE-2026-106579:
     a crafted image can bypass an ImageMagick security policy that
     uses coder as its domain, potentially allowing data prohibited
     by the policy to be read.
   * Fix CVE-2026-106580:
     a missing security-policy check in the CUT encoder allows a
     crafted local encoding operation to read data that policy should
     deny and can also cause a crash.
   * Fix CVE-2026-107208:
     Denial of service with crafted XMP profile
   * Fix CVE-2026-107209:
     when ImageMagick is built without Cairo support, a crafted
     RSVG image that reaches a resource limit can cause the
     RSVG decoder to free image state twice and then use freed memory,
     crashing the process
   * Fix CVE-2026-107210:
     A crafted highly compressed MAT image can make the MAT decoder
     create temporary files larger than the configured security-policy
     limit, bypassing resource restrictions and consuming excessive
     disk space.
   * Fix CVE-2026-109261:
     imagemagick  contains a memory leak in the GIF encoder
     because allocated memory is not released when color quantization
     fails during encoding. Attackers can supply images whose
     GIF conversion causes quantization to fail, leaking memory
     with each attempt and degrading availability.
   * Fix GHSA-83w9-w85j-h9jc:
     Memory Leak in MAT decoder in an error path.
Checksums-Sha1:
 42f447bb6abea3feb7b3f3312b7901a065244508 5165 imagemagick_7.1.1.43+dfsg1-1+deb13u13.dsc
 103af0af388a733c043845b228cf3031c16d859b 10501740 imagemagick_7.1.1.43+dfsg1.orig.tar.xz
 5b772a7cfd13900061961d0760acd1e2760e26ae 403292 imagemagick_7.1.1.43+dfsg1-1+deb13u13.debian.tar.xz
 88778a357561066add669f35cc70de5f4dadb8b9 8958 imagemagick_7.1.1.43+dfsg1-1+deb13u13_source.buildinfo
Checksums-Sha256:
 bbd83d09b7e11a0c13b0334bb6703abf86359243d5283a0b0edbbe47e187ebca 5165 imagemagick_7.1.1.43+dfsg1-1+deb13u13.dsc
 bcb4f3c78a930a608fa4889f889edbcb384974246ad9407fce1858f2c0607bfe 10501740 imagemagick_7.1.1.43+dfsg1.orig.tar.xz
 4a1dfe533644f2c567ba474af9e78fca20e6d84535aafce42fe1ff6a03d593db 403292 imagemagick_7.1.1.43+dfsg1-1+deb13u13.debian.tar.xz
 d08373fb5f0cce5198a5605a775c6ba2850348ff02c9f5e51b8c0048d908d523 8958 imagemagick_7.1.1.43+dfsg1-1+deb13u13_source.buildinfo
Files:
 1d310e55237548a9fd047c04754cba1e 5165 graphics optional imagemagick_7.1.1.43+dfsg1-1+deb13u13.dsc
 01cfb13a7c1813afb50790e431358c6c 10501740 graphics optional imagemagick_7.1.1.43+dfsg1.orig.tar.xz
 76399ec6da40722298e3c5b47ce56e28 403292 graphics optional imagemagick_7.1.1.43+dfsg1-1+deb13u13.debian.tar.xz
 9fe0e7c6614b9db333e1026ffecf38f0 8958 graphics optional imagemagick_7.1.1.43+dfsg1-1+deb13u13_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEXQGHuUCiRbrXsPVqADoaLapBCF8FAmriACoACgkQADoaLapB
CF/OfA//VykQokzOxS7QGif+UsNr40JvF8JhnMRseIySmFGw8UMtfn6URM5e0F2T
ZcJvEOxnm3f17lCAR8BQjrEo0r/O7C0tr80BQiSx4Ex5kd9Xp4FvXr6QENMXJbKM
jkaieLvAFIXpaHtluQr1Yn1aTTHuE5vjFVjuv+qRvCl0QUj9QBc/5B4kd9+m4s4J
Ud3cKeWBACozLYmzahcCqBa9vIV+1WeVlNQGOx56knEn8Rp8YmT6dgKvv9/WbavM
fbESOkkYNYcK9HkwdQRHI0GB/Y1pU5JIpWDDjwpuP/GNhX+gztvHAcbmffumQjCh
GSU5lYQN8PM1ctZdBe6DG3dbx93oabT7D1FfjBKiTPUb8iszOZYQ+rfvdx7PDVW+
TGqUwSXT+/m21XsvhNI/vXFiuQe70KaDjqeC6QHOpZLOlFgEuPljbpR9fi2Y6Er9
p4y5RfdaQfwAsRTxP4vtU5Z/3Dmjo63NvafiSae6A/Pdv1XMKZSXbxalh0AY4xPD
HK68GbWASjvPzuqYF70eYgI6/Bzt8zrEOwh3vSx4vq4F789Cq3OH+B3dtkJdLD2y
L8b50QoMCZJL/WZQTo1MOjmFG8FlUhvu14LXzAXLvTAV8l9XXBWjcIhE9hp5KMvc
+OsEhba8kPxARZX0Hwn8XygaxiMy55CzOEpgN+hcLs74B+BLbfs=
=ix1H
-----END PGP SIGNATURE-----