CVE-2023-5341: Imagemagick: heap use-after-free in coders/bmp.c

Published Oct 2, 2023
·
Updated

A heap use-after-free flaw was found in coders/bmp.c in ImageMagick.

Other sources

A vulnerability was found in ImageMagick <=7.1.1, where heap use-after-free was found in coders/bmp.c.

References: https://github.com/ImageMagick/ImageMagick/commit/aa673b2e4defc7cad5bec16c4fc8324f71e531f1

— Red Hat

Affected Software

23 affected componentsFixes available
redhat/imagemagick<7.1.2
7.1.2
ubuntu/imagemagick<8:6.9.7.4+dfsg-16ubuntu6.15+
8:6.9.7.4+dfsg-16ubuntu6.15+
ubuntu/imagemagick<8:6.9.10.23+dfsg-2.1ubuntu11.9+
8:6.9.10.23+dfsg-2.1ubuntu11.9+
ubuntu/imagemagick<8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3+
8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3+
ubuntu/imagemagick<8:6.7.7.10-6ubuntu3.13+
8:6.7.7.10-6ubuntu3.13+
ubuntu/imagemagick<7.1.1-36
7.1.1-36
ubuntu/imagemagick<8:6.8.9.9-7ubuntu5.16+
8:6.8.9.9-7ubuntu5.16+
alpine/imagemagick<7.1.1.13-r1
7.1.1.13-r1
alpine/imagemagick<7.1.1.21-r0
7.1.1.21-r0
alpine/imagemagick<7.1.1.21-r0
7.1.1.21-r0
alpine/imagemagick<7.1.1.21-r0
7.1.1.21-r0
alpine/imagemagick<7.1.1.21-r0
7.1.1.21-r0
alpine/imagemagick<7.1.1.21-r0
7.1.1.21-r0
alpine/imagemagick<7.1.1.21-r0
7.1.1.21-r0
All of the following
ImageMagick ImageMagick<7.1.2
Any of the following
redhat Enterprise Linux=6.0
redhat Enterprise Linux=7.0
Fedoraproject Extra Packages For Enterprise Linux=8.0
Fedoraproject Fedora=38
debian/imagemagick<8:6.9.11.60+dfsg-1.6+deb12u1
8:6.9.11.60+dfsg-1.6+deb12u1
debian/imagemagick<8:6.9.12.98+dfsg1-2
8:6.9.12.98+dfsg1-2
debian/imagemagick<8:6.9.12.98+dfsg1-2
8:6.9.12.98+dfsg1-2
debian/imagemagick
8:6.9.11.60+dfsg-1.6+deb12u118:6.9.11.60+dfsg-1.6+deb12u158:7.1.1.43+dfsg1-1+deb13u128:7.1.1.43+dfsg1-1+deb13u148:7.1.2.34+dfsg1-18:7.1.2.35+dfsg1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/ImageMagick to a version that resolves this vulnerability.

    Fixed in 7.1.2
  2. Upgrade

    Upgrade ubuntu/imagemagick to a version that resolves this vulnerability.

    Fixed in 8:6.9.7.4+dfsg-16ubuntu6.15+
  3. Upgrade

    Upgrade ubuntu/imagemagick to a version that resolves this vulnerability.

    Fixed in 8:6.9.10.23+dfsg-2.1ubuntu11.9+
  4. Upgrade

    Upgrade ubuntu/imagemagick to a version that resolves this vulnerability.

    Fixed in 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3+
  5. Upgrade

    Upgrade ubuntu/imagemagick to a version that resolves this vulnerability.

    Fixed in 8:6.7.7.10-6ubuntu3.13+
  6. Upgrade

    Upgrade ubuntu/imagemagick to a version that resolves this vulnerability.

    Fixed in 7.1.1-36
  7. Upgrade

    Upgrade ubuntu/imagemagick to a version that resolves this vulnerability.

    Fixed in 8:6.8.9.9-7ubuntu5.16+
  8. Upgrade

    Upgrade alpine/imagemagick to a version that resolves this vulnerability.

    Fixed in 7.1.1.13-r1
  9. Upgrade

    Upgrade alpine/imagemagick to a version that resolves this vulnerability.

    Fixed in 7.1.1.21-r0
  10. Upgrade

    Upgrade debian/imagemagick to a version that resolves this vulnerability.

    Fixed in 8:6.9.11.60+dfsg-1.6+deb12u1
  11. Upgrade

    Upgrade debian/imagemagick to a version that resolves this vulnerability.

    Fixed in 8:6.9.12.98+dfsg1-2
  12. Upgrade

    Upgrade debian/imagemagick to a version that resolves this vulnerability.

    Fixed in 8:6.9.11.60+dfsg-1.6+deb12u11Fixed in 8:6.9.11.60+dfsg-1.6+deb12u15Fixed in 8:7.1.1.43+dfsg1-1+deb13u12Fixed in 8:7.1.1.43+dfsg1-1+deb13u14Fixed in 8:7.1.2.34+dfsg1-1Fixed in 8:7.1.2.35+dfsg1-1

Event History

Nov 19, 2023
CVE Published
via Ubuntu·12:00 AM
CVE Published
via MITRE·09:20 AM
Data Sourced
via MITRE·09:20 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 2, 2024
Exploit Published
via CISA·08:55 PM
Nov 3, 2026
Data Sourced
via OSV·06:32 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2023-5341?

The severity of CVE-2023-5341 is medium with a severity value of 6.2.

2

How does CVE-2023-5341 affect ImageMagick?

CVE-2023-5341 affects ImageMagick version 7.1.2 and earlier.

3

What is the vulnerability in coders/bmp.c?

The vulnerability in coders/bmp.c is a heap use-after-free flaw.

4

How can I fix CVE-2023-5341 in ImageMagick?

To fix CVE-2023-5341 in ImageMagick, update to version 7.1.2 or later.

5

Is Red Hat Enterprise Linux affected by CVE-2023-5341?

Red Hat Enterprise Linux 6.0 and 7.0 are not affected by CVE-2023-5341.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203