{"id":"CVE-2021-21235","state":"PUBLISHED","title":"Infinite loop in parsing PNG files in","description":"kamadak-exif is an exif parsing library written in pure Rust. In kamadak-exif version 0.5.2, there is an infinite loop in parsing crafted PNG files. Specifically, reader::read_from_container can cause an infinite loop when a crafted PNG file is given. This is fixed in version 0.5.3. No workaround is available. Applications that do not pass files with the PNG signature to Reader::read_from_container are not affected.","publishedAt":"2021-01-06T01:15:14.000Z","updatedAt":"2024-08-03T18:09:14.897Z","severity":{"score":5.7,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["kamadak exif-rs"],"affected":[{"vendor":"kamadak","product":"exif-rs","versions":[{"version":"= 0.5.2","status":"affected"}]}],"references":["https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2","https://crates.io/crates/kamadak-exif","https://github.com/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48"],"weaknesses":["CWE-400"],"ingestedAt":"2026-10-29T19:47:59.168Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/21xxx/CVE-2021-21235.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2021-21235","state":"PUBLISHED","datePublished":"2021-01-06T01:15:14.000Z","dateUpdated":"2024-08-03T18:09:14.897Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2020-12-22T00:00:00.000Z"},"containers":{"cna":{"title":"Infinite loop in parsing PNG files in","descriptions":[{"lang":"en","value":"kamadak-exif is an exif parsing library written in pure Rust. In kamadak-exif version 0.5.2, there is an infinite loop in parsing crafted PNG files. Specifically, reader::read_from_container can cause an infinite loop when a crafted PNG file is given. This is fixed in version 0.5.3. No workaround is available. Applications that do not pass files with the PNG signature to Reader::read_from_container are not affected."}],"affected":[{"vendor":"kamadak","product":"exif-rs","versions":[{"version":"= 0.5.2","status":"affected"}]}],"references":[{"url":"https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2","tags":["x_refsource_CONFIRM"]},{"url":"https://crates.io/crates/kamadak-exif","tags":["x_refsource_MISC"]},{"url":"https://github.com/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":5.7,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-400","description":"CWE-400: Uncontrolled Resource Consumption","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","dateUpdated":"2021-01-06T01:15:14.000Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa"},"source":{"advisory":"GHSA-px9g-8hgv-jvg2","discovery":"UNKNOWN"},"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2021-21235","STATE":"PUBLIC","TITLE":"Infinite loop in parsing PNG files in"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"exif-rs","version":{"version_data":[{"version_value":"= 0.5.2"}]}}]},"vendor_name":"kamadak"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"kamadak-exif is an exif parsing library written in pure Rust. In kamadak-exif version 0.5.2, there is an infinite loop in parsing crafted PNG files. Specifically, reader::read_from_container can cause an infinite loop when a crafted PNG file is given. This is fixed in version 0.5.3. No workaround is available. Applications that do not pass files with the PNG signature to Reader::read_from_container are not affected."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":5.7,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-400: Uncontrolled Resource Consumption"}]}]},"references":{"reference_data":[{"name":"https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2","refsource":"CONFIRM","url":"https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2"},{"name":"https://crates.io/crates/kamadak-exif","refsource":"MISC","url":"https://crates.io/crates/kamadak-exif"},{"name":"https://github.com/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48","refsource":"MISC","url":"https://github.com/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48"}]},"source":{"advisory":"GHSA-px9g-8hgv-jvg2","discovery":"UNKNOWN"}}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://crates.io/crates/kamadak-exif","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T18:09:14.897Z"}}]}}}