{"id":"CVE-2022-31630","state":"PUBLISHED","title":"OOB read due to insufficient input validation in imageloadfont()","description":"In PHP versions prior to 7.4.33, 8.0.25 and 8.1.12, when using imageloadfont() function in gd extension, it is possible to supply a specially crafted font file, such as if the loaded font is used with imagechar() function, the read outside allocated buffer will be used. This can lead to crashes or disclosure of confidential information. ","publishedAt":"2022-11-14T06:53:06.774Z","updatedAt":"2024-08-03T07:26:01.044Z","severity":{"score":6.5,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","source":"php"},"assigner":"php","products":["PHP Group PHP"],"affected":[{"vendor":"PHP Group","product":"PHP","defaultStatus":"unaffected","versions":[{"version":"7.4.x","status":"affected","lessThan":"7.4.33","versionType":"custom"},{"version":"8.0.x","status":"affected","lessThan":"8.0.25","versionType":"custom"},{"version":"8.1.x","status":"affected","lessThan":"8.1.12","versionType":"custom"}],"modules":["gd"],"repo":"https://github.com/php/php-src"}],"references":["https://bugs.php.net/bug.php?id=81739"],"weaknesses":["CWE-131","CWE-190"],"ingestedAt":"2026-10-29T19:50:06.617Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/31xxx/CVE-2022-31630.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2022-31630","state":"PUBLISHED","datePublished":"2022-11-14T06:53:06.774Z","dateUpdated":"2024-08-03T07:26:01.044Z","assignerShortName":"php","assignerOrgId":"dd77f84a-d19a-4638-8c3d-a322d820ed2b","requesterUserId":"520cc88b-a1c8-44f6-9154-21a4d74c769f","dateReserved":"2022-05-25T21:03:32.861Z"},"containers":{"cna":{"title":"OOB read due to insufficient input validation in imageloadfont()","descriptions":[{"lang":"en","value":"In PHP versions prior to 7.4.33, 8.0.25 and 8.1.12, when using imageloadfont() function in gd extension, it is possible to supply a specially crafted font file, such as if the loaded font is used with imagechar() function, the read outside allocated buffer will be used. This can lead to crashes or disclosure of confidential information. "}],"affected":[{"vendor":"PHP Group","product":"PHP","defaultStatus":"unaffected","versions":[{"version":"7.4.x","status":"affected","lessThan":"7.4.33","versionType":"custom"},{"version":"8.0.x","status":"affected","lessThan":"8.0.25","versionType":"custom"},{"version":"8.1.x","status":"affected","lessThan":"8.1.12","versionType":"custom"}],"modules":["gd"],"repo":"https://github.com/php/php-src"}],"references":[{"url":"https://bugs.php.net/bug.php?id=81739"}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":6.5,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-131","description":"CWE-131 Incorrect Calculation of Buffer Size","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-190","description":"CWE-190 Integer Overflow or Wraparound","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"php","orgId":"dd77f84a-d19a-4638-8c3d-a322d820ed2b","dateUpdated":"2024-04-02T02:38:25.144Z"},"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"gd extension"}],"value":"gd extension"}],"credits":[{"lang":"en","type":"reporter","user":"00000000-0000-4000-9000-000000000000","value":"cmb@php.net"},{"lang":"en","type":"remediation developer","user":"00000000-0000-4000-9000-000000000000","value":"cmb@php.net"}],"datePublic":"2022-10-24T06:40:00.000Z","impacts":[{"capecId":"CAPEC-540","descriptions":[{"lang":"en","value":"CAPEC-540 Overread Buffers"}]}],"source":{"defect":["https://bugs.php.net/bug.php?id=81739"],"discovery":"INTERNAL"},"x_generator":{"engine":"Vulnogram 0.1.0-dev"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://bugs.php.net/bug.php?id=81739","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T07:26:01.044Z"}}]}}}