CVE-2017-18220:Use-after-free vulnerability in GraphicsMagick 1.3.26 when processing JNG images.

splash
Back

Description Preview

GraphicsMagick 1.3.26 contains a use-after-free vulnerability in the ReadOneJNGImage and ReadJNGImage functions located in coders/png.c. When processing specially crafted JNG image files, the application may attempt to access memory after it has been freed in the CloseBlob function in magick/blob.c. This vulnerability could lead to denial of service conditions or potentially allow for remote code execution. This issue is related to CVE-2017-11403 and has been assigned CWE-416 (Use After Free).

Overview

GraphicsMagick is a robust collection of tools and libraries for reading, writing, and manipulating images in various formats. The vulnerability exists in the JNG (JPEG Network Graphics) image processing functionality. When parsing maliciously crafted JNG files, the application incorrectly manages memory resources, leading to a situation where it attempts to access memory that has already been freed. This use-after-free condition can cause the application to crash, resulting in denial of service. In some cases, attackers may be able to exploit this vulnerability to execute arbitrary code with the privileges of the application processing the image.

Remediation

Users and administrators should take the following actions to mitigate this vulnerability:

  1. Update GraphicsMagick to a patched version that contains the fix (the patch is available in the referenced commit 98721124e51f).
  2. If using a package manager, apply security updates from your distribution:
    • Debian users should apply DLA 1322-1 (for Debian LTS), DLA 1456-1 (for Debian LTS), or DSA-4321 (for stable Debian)
    • Fedora users should apply updates referenced in FEDORA-2019-da4c20882c and FEDORA-2019-425a1aa7c9
  3. If immediate updating is not possible, implement input validation to ensure only trusted JNG images are processed by the application.
  4. Consider using application sandboxing or containerization to limit the impact of potential exploits.

References

  1. Patch: http://hg.graphicsmagick.org/hg/GraphicsMagick/rev/98721124e51f
  2. Bug Report: https://sourceforge.net/p/graphicsmagick/bugs/438/
  3. SecurityFocus: http://www.securityfocus.com/bid/103276
  4. Debian Security Advisory: https://www.debian.org/security/2018/dsa-4321
  5. Debian LTS Announcements:
    • https://lists.debian.org/debian-lts-announce/2018/03/msg00025.html
    • https://lists.debian.org/debian-lts-announce/2018/08/msg00002.html
  6. Fedora Package Announcements:
    • https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PF62B5PJA2JDUOCKJGUQO3SPL74BEYSV/
    • https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WHIKB4TP6KBJWT2UIPWL5MWMG5QXKGEJ/

Industry ExposureMost to least
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.

  1. Accommodation & Food Services
    Accommodation & Food Services
  2. Administrative, Support, Waste Management & Remediation Services
    Administrative, Support, Waste Management & Remediation Services
  3. Agriculture, Forestry Fishing & Hunting
    Agriculture, Forestry Fishing & Hunting
  4. Arts, Entertainment & Recreation
    Arts, Entertainment & Recreation
  5. Construction
    Construction
  6. Educational Services
    Educational Services
  7. Finance and Insurance
    Finance and Insurance
  8. Health Care & Social Assistance
    Health Care & Social Assistance
  9. Information
    Information
  10. Management of Companies & Enterprises
    Management of Companies & Enterprises
  11. Manufacturing
    Manufacturing
  12. Mining
    Mining
  13. Other Services (except Public Administration)
    Other Services (except Public Administration)
  14. Professional, Scientific, & Technical Services
    Professional, Scientific, & Technical Services
  15. Public Administration
    Public Administration
  16. Real Estate Rental & Leasing
    Real Estate Rental & Leasing
  17. Retail Trade
    Retail Trade
  18. Transportation & Warehousing
    Transportation & Warehousing
  19. Utilities
    Utilities
  20. Wholesale Trade
    Wholesale Trade

Focus on What Matters

  1. See Everything.
  2. Identify True Risk.
  3. Proactively Mitigate Threats.

Let's talk!

background