{"id":"CVE-2021-20240","aliases":["ALPINE-CVE-2021-20240","BELL-CVE-2021-20240","DEBIAN-CVE-2021-20240","EUVD-2021-7679","GHSA-cjqx-m2ff-vgj5","OESA-2022-1762","UBUNTU-CVE-2021-20240","USN-4743-1"],"status":"published","title":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out...","description":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.","severity":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.02346,"percentile":0.83875,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-191","CWE-787"],"published":"2021-02-17T00:00:00Z","modified":"2026-11-04T10:45:06Z","fixes":[{"ecosystem":"Alpine:v3.11","package":"gdk-pixbuf","fixed_in":["2.40.0-r1"],"sources":["osv"]},{"ecosystem":"Alpine:v3.12","package":"gdk-pixbuf","fixed_in":["2.40.0-r3"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"gdk-pixbuf","fixed_in":["2.42.2+dfsg-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"gdk-pixbuf","fixed_in":["2.42.2+dfsg-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"gdk-pixbuf","fixed_in":["2.42.2+dfsg-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"gdk-pixbuf","fixed_in":["2.40.0+dfsg-3ubuntu0.2"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Alpine:v3.11","package":"gdk-pixbuf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.40.0-r1"}]}]},{"source":"osv","ecosystem":"Alpine:v3.12","package":"gdk-pixbuf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.40.0-r3"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"gdk-pixbuf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.42.2+dfsg-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"gdk-pixbuf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.42.2+dfsg-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"gdk-pixbuf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.42.2+dfsg-1"}]}]},{"source":"osv","ecosystem":"openEuler:20.03-LTS-SP3","package":"gdk-pixbuf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.40.0-2.oe1"}]}],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"gdk-pixbuf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.40.0+dfsg-3ubuntu0.2"}]}],"versions":["2.40.0+dfsg-1build1","2.40.0+dfsg-1ubuntu1","2.40.0+dfsg-2","2.40.0+dfsg-3","2.40.0+dfsg-3ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"gdk-pixbuf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.40.0+dfsg-3ubuntu0.2"}]}],"versions":["2.40.0+dfsg-1build1","2.40.0+dfsg-1ubuntu1","2.40.0+dfsg-2","2.40.0+dfsg-3","2.40.0+dfsg-3ubuntu0.1"]}],"products":[{"vendor":"fedoraproject","product":"fedora"},{"vendor":"gnome","product":"gdk-pixbuf"}],"references":[{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EANWYODLOJDFLMBH6WEKJJMQ5PKLEWML/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B5H3GNVWMZTYZR3JBYCK57PF7PFMQBNP/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BGZVCTH5O7WBJLYXZ2UOKLYNIFPVR55D/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1926787","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","Third Party Advisory","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-20240","tags":["advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B5H3GNVWMZTYZR3JBYCK57PF7PFMQBNP"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BGZVCTH5O7WBJLYXZ2UOKLYNIFPVR55D"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EANWYODLOJDFLMBH6WEKJJMQ5PKLEWML"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B5H3GNVWMZTYZR3JBYCK57PF7PFMQBNP"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BGZVCTH5O7WBJLYXZ2UOKLYNIFPVR55D"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EANWYODLOJDFLMBH6WEKJJMQ5PKLEWML"},{"url":"https://github.com/advisories/GHSA-cjqx-m2ff-vgj5"},{"url":"https://security.alpinelinux.org/vuln/CVE-2021-20240","tags":["advisory"]},{"url":"https://docs.bell-sw.com/security/cves/CVE-2021-20240","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-20240","tags":["advisory"]},{"url":"https://www.openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1762","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-29385","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-20240","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-4743-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-20240","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-20240","description":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.","status":"published","published":"2021-05-28T10:42:35Z","modified":"2024-08-03T17:37:22.704Z","cwes":["CWE-191"],"updated_at":"2026-11-02T14:32:55.564736Z"}],"euvd":[{"id":"EUVD-2021-7679","description":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.","status":"published","published":"2021-05-28T10:42:35Z","modified":"2024-08-03T17:37:22Z","updated_at":"2026-11-03T03:25:09.355483Z"}],"ghsa":[{"id":"GHSA-cjqx-m2ff-vgj5","title":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out...","description":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.","status":"published","published":"2022-05-24T19:03:38Z","modified":"2025-02-12T18:32:27Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-191","CWE-787"],"updated_at":"2026-11-02T14:59:54.827515Z"}],"nvd":[{"id":"CVE-2021-20240","description":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.","status":"published","published":"2021-05-28T11:15:08.037Z","modified":"2026-06-17T03:33:31.883Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":8.3,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:C","level":"high","assessor":"primary"}],"cwes":["CWE-191"],"updated_at":"2026-11-02T14:06:53.987491Z"}],"osv":[{"id":"ALPINE-CVE-2021-20240","description":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.","status":"published","published":"2021-05-28T11:15:08.037Z","modified":"2026-10-23T17:17:56.142379443Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:27:48.646074Z"},{"id":"BELL-CVE-2021-20240","title":"CVE-2021-20240 does not affect BellSoft software","status":"withdrawn","published":"2021-05-28T11:15:00Z","modified":"2026-01-26T09:46:52.888505Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:28:15.925958Z"},{"id":"CVE-2021-20240","description":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.","status":"published","published":"2021-05-28T11:15:08.037Z","modified":"2026-11-04T10:45:06.920542625Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-04T11:07:20.833685Z"},{"id":"DEBIAN-CVE-2021-20240","description":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.","status":"published","published":"2021-05-28T11:15:08.037Z","modified":"2026-10-23T18:02:41.04172526Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:34.637046Z"},{"id":"OESA-2022-1762","title":"gdk-pixbuf2 security update","description":"gdk is written in C but has been designed from the ground up to support a wide range of languages. It provide a complete set of widgets,and suitable for projects ranging from small one-off tools to complete application suites.\r\n\r\nSecurity Fix(es):\r\n\r\nA flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.(CVE-2021-20240)\r\n\r\nGNOME gdk-pixbuf (aka GdkPixbuf) before 2.42.2 allows a denial of service (infinite loop) in lzw.c in the function write_indexes. if c-\u0026gt;self_code equals 10, self-\u0026gt;code_table[10].extends will assign the value 11 to c. The next execution in the loop will assign self-\u0026gt;code_table[11].extends to c, which will give the value of 10. This will make the loop run infinitely. This bug can, for example, be triggered by calling this function with a GIF image with LZW compression that is crafted in a special way.(CVE-2020-29385)","status":"published","published":"2022-07-22T11:05:02Z","modified":"2026-08-18T01:16:49.865635067Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:39.528805Z"},{"id":"UBUNTU-CVE-2021-20240","description":"A flaw was found in gdk-pixbuf in versions before 2.42.0. An integer wraparound leading to an out of bounds write can occur when a crafted GIF image is loaded. An attacker may cause applications to crash or could potentially execute code on the victim system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.","status":"published","published":"2021-02-17T00:00:00Z","modified":"2026-04-22T12:46:09.411219Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:25.728622Z"},{"id":"USN-4743-1","title":"gdk-pixbuf vulnerability","description":"It was discovered that the GDK-PixBuf library did not properly handle\ncertain GIF images. If an user or automated system were tricked into\nopening a specially crafted GIF file, a remote attacker could use this flaw\nto cause GDK-PixBuf to crash, resulting in a denial of service.\n","status":"published","published":"2021-02-22T14:15:59Z","modified":"2026-04-22T10:11:52.939836Z","updated_at":"2026-11-02T16:58:15.159055Z"}]}}
