{"id":"CVE-2026-49452","state":"PUBLISHED","title":"WeasyPrint: CSS Injection via Presentational Hints","description":"WeasyPrint helps web developers to create PDF documents. Prior to 69.0, WeasyPrint embeds unescaped HTML presentational-hint attribute values into CSS in weasyprint/css/__init__.py when presentational_hints=True. The background attribute is inserted into a background-image:url() declaration and parsed by tinycss2.parse_blocks_contents(), allowing untrusted HTML to inject additional CSS declarations. Applications that render untrusted HTML with presentational hints enabled can be affected by CSS injection and server-side requests through injected url() values. This issue is fixed in version 69.0.","publishedAt":"2026-08-18T17:59:36.144Z","updatedAt":"2026-08-19T15:12:42.865Z","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:L/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["Kozea WeasyPrint"],"affected":[{"vendor":"Kozea","product":"WeasyPrint","versions":[{"version":"< 69.0","status":"affected"}]}],"references":["https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-jhhc-3hcp-qhm5","https://github.com/Kozea/WeasyPrint/pull/2773","https://github.com/Kozea/WeasyPrint/commit/e158264e33fa399b29f415d30719c1d85a55df1d","https://github.com/Kozea/WeasyPrint/releases/tag/v69.0"],"weaknesses":["CWE-74"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/49xxx/CVE-2026-49452.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-49452","state":"PUBLISHED","datePublished":"2026-08-18T17:59:36.144Z","dateUpdated":"2026-08-19T15:12:42.865Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-05-30T02:43:33.106Z"},"containers":{"cna":{"title":"WeasyPrint: CSS Injection via Presentational Hints","descriptions":[{"lang":"en","value":"WeasyPrint helps web developers to create PDF documents. Prior to 69.0, WeasyPrint embeds unescaped HTML presentational-hint attribute values into CSS in weasyprint/css/__init__.py when presentational_hints=True. The background attribute is inserted into a background-image:url() declaration and parsed by tinycss2.parse_blocks_contents(), allowing untrusted HTML to inject additional CSS declarations. Applications that render untrusted HTML with presentational hints enabled can be affected by CSS injection and server-side requests through injected url() values. This issue is fixed in version 69.0."}],"affected":[{"vendor":"Kozea","product":"WeasyPrint","versions":[{"version":"< 69.0","status":"affected"}]}],"references":[{"url":"https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-jhhc-3hcp-qhm5","name":"https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-jhhc-3hcp-qhm5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/Kozea/WeasyPrint/pull/2773","name":"https://github.com/Kozea/WeasyPrint/pull/2773","tags":["x_refsource_MISC"]},{"url":"https://github.com/Kozea/WeasyPrint/commit/e158264e33fa399b29f415d30719c1d85a55df1d","name":"https://github.com/Kozea/WeasyPrint/commit/e158264e33fa399b29f415d30719c1d85a55df1d","tags":["x_refsource_MISC"]},{"url":"https://github.com/Kozea/WeasyPrint/releases/tag/v69.0","name":"https://github.com/Kozea/WeasyPrint/releases/tag/v69.0","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":6.5,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-74","lang":"en","description":"CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-08-18T17:59:36.144Z"},"source":{"advisory":"GHSA-jhhc-3hcp-qhm5","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-jhhc-3hcp-qhm5","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-19T15:12:11.871495Z","id":"CVE-2026-49452","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-19T15:12:42.865Z"}}]}}}