{"id":"CVE-2021-33391","aliases":["AZL-13687","AZL-35324","DEBIAN-CVE-2021-33391","EUVD-2021-20097","GHSA-wfrp-xv2m-8j85","OESA-2024-1017","OESA-2024-1073","UBUNTU-CVE-2021-33391","USN-6483-1"],"status":"published","title":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option...","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.01128,"percentile":0.66775,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2023-02-17T00:00:00Z","modified":"2026-11-05T05:40:51Z","fixes":[{"ecosystem":"Azure Linux:2","package":"tidy","fixed_in":["5.8.0-6"],"sources":["osv"]},{"ecosystem":"Azure Linux:3","package":"tidy","fixed_in":["5.8.0-6"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"tidy-html5","fixed_in":["2:5.8.0-2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"tidy-html5","fixed_in":["2:5.8.0-2"],"sources":["osv"]},{"ecosystem":"openEuler:20.03-LTS-SP1","package":"tidy","fixed_in":["5.6.0-5.oe1"],"sources":["osv"]},{"ecosystem":"openEuler:20.03-LTS-SP3","package":"tidy","fixed_in":["5.6.0-5.oe1"],"sources":["osv"]},{"ecosystem":"openEuler:20.03-LTS-SP4","package":"tidy","fixed_in":["5.6.0-5.oe2003sp4"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS","package":"tidy","fixed_in":["5.7.28-2.oe2203sp2"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS-SP1","package":"tidy","fixed_in":["5.7.28-2.oe2203sp1"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS-SP2","package":"tidy","fixed_in":["5.7.28-2.oe2203sp2"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS-SP3","package":"tidy","fixed_in":["5.7.28-2.oe2203sp3"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"tidy-html5","fixed_in":["2:5.6.0-11ubuntu0.20.04.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"tidy-html5","fixed_in":["2:5.6.0-11ubuntu0.22.04.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:24.04:LTS","package":"tidy-html5","fixed_in":["2:5.6.0-11ubuntu1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Azure Linux:2","package":"tidy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.0-6"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"tidy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.0-6"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"tidy-html5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:5.6.0-11","2:5.7.45-1~exp1","2:5.8.0-1","2:5.8.0-1~exp1","2:5.8.0-1~exp2","2:5.8.0-2","2:5.8.0-2.1"]},{"source":"osv","ecosystem":"Debian:13","package":"tidy-html5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:5.8.0-2"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"tidy-html5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:5.8.0-2"}]}]},{"source":"osv","ecosystem":"openEuler:20.03-LTS-SP1","package":"tidy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.6.0-5.oe1"}]}]},{"source":"osv","ecosystem":"openEuler:20.03-LTS-SP3","package":"tidy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.6.0-5.oe1"}]}]},{"source":"osv","ecosystem":"openEuler:20.03-LTS-SP4","package":"tidy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.6.0-5.oe2003sp4"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS","package":"tidy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.28-2.oe2203sp2"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS-SP1","package":"tidy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.28-2.oe2203sp1"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS-SP2","package":"tidy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.28-2.oe2203sp2"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS-SP3","package":"tidy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.28-2.oe2203sp3"}]}]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"tidy-html5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1:5.2.0-2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"tidy-html5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:5.6.0-11ubuntu0.20.04.1"}]}],"versions":["2:5.6.0-10","2:5.6.0-11"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"tidy-html5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:5.6.0-11ubuntu0.22.04.1"}]}],"versions":["2:5.6.0-11build1","2:5.6.0-11build2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"tidy-html5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:5.6.0-11ubuntu1"}]}],"versions":["2:5.6.0-11build2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"tidy-html5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:5.6.0-11ubuntu0.20.04.1"}]}],"versions":["2:5.6.0-10","2:5.6.0-11"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"tidy-html5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:5.6.0-11ubuntu0.22.04.1"}]}],"versions":["2:5.6.0-11build1","2:5.6.0-11build2"]}],"products":[{"vendor":"htacg","product":"tidy"}],"references":[{"url":"https://github.com/htacg/tidy-html5/issues/946","tags":["x_transferred","Exploit","Patch","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-33391","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-wfrp-xv2m-8j85"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-33391","tags":["advisory"]},{"url":"https://www.openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2024-1017","tags":["advisory"]},{"url":"https://www.openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2024-1073","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-33391","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6483-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-33391","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-33391","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","status":"published","published":"2023-02-17T00:00:00Z","modified":"2025-03-18T19:03:45.661Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:33:10.204494Z"}],"euvd":[{"id":"EUVD-2021-20097","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","status":"published","published":"2023-02-17T00:00:00Z","modified":"2025-03-18T19:03:45Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T20:52:59.954045Z"}],"ghsa":[{"id":"GHSA-wfrp-xv2m-8j85","title":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option...","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","status":"published","published":"2023-02-17T18:30:23Z","modified":"2023-03-08T05:05:55Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:54:17.697698Z"}],"nvd":[{"id":"CVE-2021-33391","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","status":"published","published":"2023-02-17T18:15:11.187Z","modified":"2026-06-17T03:54:31.73Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:07:07.323379Z"}],"osv":[{"id":"AZL-13687","title":"CVE-2021-33391 affecting package tidy for versions less than 5.8.0-6","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","status":"published","published":"2023-02-17T18:15:11Z","modified":"2026-04-21T04:22:56.383401Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:28:03.093433Z"},{"id":"AZL-35324","title":"CVE-2021-33391 affecting package tidy for versions less than 5.8.0-6","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","status":"published","published":"2023-02-17T18:15:11Z","modified":"2026-11-05T05:40:51Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-05T16:41:19.554273Z"},{"id":"CVE-2021-33391","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","status":"published","published":"2023-02-17T18:15:11.187Z","modified":"2026-03-14T10:59:16.509676Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:19.793849Z"},{"id":"DEBIAN-CVE-2021-33391","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","status":"published","published":"2023-02-17T18:15:11.187Z","modified":"2026-10-23T18:03:14.247483275Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:35.233346Z"},{"id":"OESA-2024-1017","title":"tidy security update","description":"When editing HTML it\u0026apos;s easy to make mistakes. Wouldn\u0026apos;t it be nice if there was a simple way to fix these mistakes automatically and tidy up sloppy editing into nicely laid out markup? Well now there is! Dave Raggett\u0026apos;s HTML TIDY is a free utility for doing just that. It also works great on the atrociously hard to read markup generated by specialized HTML editors and conversion tools, and can help you identify where you need to pay further attention on making your pages more accessible to people with disabilities.\r\n\r\nSecurity Fix(es):\r\n\r\nAn issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.(CVE-2021-33391)","status":"published","published":"2024-01-05T11:06:28Z","modified":"2026-08-18T01:18:12.25588833Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:40.71472Z"},{"id":"OESA-2024-1073","title":"tidy security update","description":"When editing HTML it\u0026apos;s easy to make mistakes. Wouldn\u0026apos;t it be nice if there was a simple way to fix these mistakes automatically and tidy up sloppy editing into nicely laid out markup? Well now there is! Dave Raggett\u0026apos;s HTML TIDY is a free utility for doing just that. It also works great on the atrociously hard to read markup generated by specialized HTML editors and conversion tools, and can help you identify where you need to pay further attention on making your pages more accessible to people with disabilities.\r\n\r\nSecurity Fix(es):\r\n\r\nAn issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.(CVE-2021-33391)","status":"published","published":"2024-01-12T11:06:31Z","modified":"2026-08-18T01:18:12.651259472Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:40.71472Z"},{"id":"UBUNTU-CVE-2021-33391","description":"An issue in HTACG HTML Tidy v5.7.28 allows attacker to execute arbitrary code via the -g option of the CleanNode() function in gdoc.c.","status":"published","published":"2023-02-17T18:15:00Z","modified":"2026-04-22T12:53:56.808627Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:27.870979Z"},{"id":"USN-6483-1","title":"tidy-html5 vulnerability","description":"Neeraj Pal discovered that HTML Tidy incorrectly handled parsing certain\nHTML data. If a user or automated system were tricked into parsing\nspecially crafted HTML data, a remote attacker could cause HTML Tidy to\nconsume resources, leading to a denial of service, or possibly execute\narbitrary code.\n","status":"published","published":"2023-11-15T14:31:49Z","modified":"2026-04-27T16:57:17.212373Z","updated_at":"2026-11-02T16:58:17.305935Z"}]}}
