{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-46822 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2021-46822 is a medium-severity memory corruption vulnerability in n/a, published on 18 Jun 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-46822 and fix it if it is affected.\n\nWhat it is: CVE-2021-46822 is a medium-severity memory corruption vulnerability in n/a, published on 18 Jun 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-46822 in the wild and no public exploit code.\n\nAffected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-46822/ (Markdown: https://insights.sbomify.com/CVE-2021-46822/index.md)","id":"CVE-2021-46822","markdown":"https://insights.sbomify.com/CVE-2021-46822/index.md","name":"CVE-2021-46822","record":{"aliases":["ALSA-2023:1068","DEBIAN-CVE-2021-46822","GHSA-p468-hq86-gghc","JLSEC-2025-180","MGASA-2022-0353","OESA-2022-1745","RHSA-2023:1068","RLSA-2023:1068","ROOT-OS-DEBIAN-11-CVE-2021-46822","UBUNTU-CVE-2021-46822"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"libjpeg-turbo image library","requires_auth":"none","summary":"Heap-based buffer overflow in libjpeg-turbo PPM reader allows attackers to execute arbitrary code or cause denial of service via crafted images.","user_interaction":"required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"libjpeg-turbo","vendor":"libjpeg-turbo"}],"cvss":{"score":5.5,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"description":"The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.","ecosystems":["AlmaLinux:9","Red Hat:enterprise_linux:9::appstream","Red Hat:enterprise_linux:9::crb","Rocky Linux:9"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Memory corruption in n/a","id":"CVE-2021-46822","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"memory_corruption","year":"2021"},"n_packages":19,"n_references":2,"next":{"headline":"Denial of Service in python-ldap","id":"CVE-2021-46823"},"packages":[{"ecosystem":"AlmaLinux:9","fixed":["2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo","purl":"pkg:rpm/almalinux/libjpeg-turbo","source":"ALSA-2023:1068"},{"ecosystem":"AlmaLinux:9","fixed":["2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-devel","purl":"pkg:rpm/almalinux/libjpeg-turbo-devel","source":"ALSA-2023:1068"},{"ecosystem":"AlmaLinux:9","fixed":["2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-utils","purl":"pkg:rpm/almalinux/libjpeg-turbo-utils","source":"ALSA-2023:1068"},{"ecosystem":"AlmaLinux:9","fixed":["2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"turbojpeg","purl":"pkg:rpm/almalinux/turbojpeg","source":"ALSA-2023:1068"},{"ecosystem":"AlmaLinux:9","fixed":["2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"turbojpeg-devel","purl":"pkg:rpm/almalinux/turbojpeg-devel","source":"ALSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo","purl":"pkg:rpm/redhat/libjpeg-turbo","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-debuginfo","purl":"pkg:rpm/redhat/libjpeg-turbo-debuginfo","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-debugsource","purl":"pkg:rpm/redhat/libjpeg-turbo-debugsource","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-devel","purl":"pkg:rpm/redhat/libjpeg-turbo-devel","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-utils","purl":"pkg:rpm/redhat/libjpeg-turbo-utils","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-utils-debuginfo","purl":"pkg:rpm/redhat/libjpeg-turbo-utils-debuginfo","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"turbojpeg-debuginfo","purl":"pkg:rpm/redhat/turbojpeg-debuginfo","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-debuginfo","purl":"pkg:rpm/redhat/libjpeg-turbo-debuginfo","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-debugsource","purl":"pkg:rpm/redhat/libjpeg-turbo-debugsource","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo-utils-debuginfo","purl":"pkg:rpm/redhat/libjpeg-turbo-utils-debuginfo","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"turbojpeg","purl":"pkg:rpm/redhat/turbojpeg","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"turbojpeg-debuginfo","purl":"pkg:rpm/redhat/turbojpeg-debuginfo","source":"RHSA-2023:1068"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"turbojpeg-devel","purl":"pkg:rpm/redhat/turbojpeg-devel","source":"RHSA-2023:1068"},{"ecosystem":"Rocky Linux:9","fixed":["0:2.0.90-6.el9_1"],"introduced":["0"],"last_affected":[],"package":"libjpeg-turbo","purl":"pkg:rpm/rocky-linux/libjpeg-turbo?distro=rocky-linux-9\u0026epoch=0","source":"RLSA-2023:1068"}],"prev":{"headline":"Missing authorization in n/a","id":"CVE-2021-46820"},"products":["n/a"],"published":"2022-06-18","related":[{"cvss_score":8.8,"headline":"Memory corruption in n/a","id":"CVE-2020-17541","kev_date_added":null,"published":"2021-06-01"},{"cvss_score":8.8,"headline":"Integer overflow in n/a","id":"CVE-2018-20330","kev_date_added":null,"published":"2018-12-21"},{"cvss_score":8.1,"headline":"Memory corruption in n/a","id":"CVE-2020-13790","kev_date_added":null,"published":"2020-06-03"},{"cvss_score":6.5,"headline":"Memory corruption in libjpeg-turbo","id":"CVE-2023-2804","kev_date_added":null,"published":"2023-05-25"},{"cvss_score":6.5,"headline":"Memory corruption in n/a","id":"CVE-2018-19664","kev_date_added":null,"published":"2018-11-29"},{"cvss_score":6.5,"headline":"Null dereference in n/a","id":"CVE-2017-15232","kev_date_added":null,"published":"2017-10-11"},{"cvss_score":5.5,"headline":"Null dereference in libjpeg-turbo","id":"CVE-2020-35538","kev_date_added":null,"published":"2022-08-31"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"BSD","name":"Rocky Linux","prefix":"RLSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["n/a"]},"summary":"Heap-based buffer overflow in libjpeg-turbo PPM reader allows attackers to execute arbitrary code or cause denial of service via crafted images.","url":"https://insights.sbomify.com/CVE-2021-46822/"}