CVE-2021-20308
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code...
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code and cause a denial of service that is similar to CVE-2017-9181.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code and cause a denial of service that is similar to CVE-2017-9181.
- Record
CVE-2021-20308- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-190
- Updated
- 2026-11-02
CVE List No score
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code and cause a denial of service that is similar to CVE-2017-9181.
- Record
CVE-2021-20308- Weakness
- CWE-190
- Updated
- 2026-11-02
EUVDEUVD-2021-7733 No score
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code and cause a denial of service that is similar to CVE-2017-9181.
- Record
EUVD-2021-7733- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-pmv7-7c58-mhrx No score
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code...
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code and cause a denial of service that is similar to CVE-2017-9181.
- Record
GHSA-pmv7-7c58-mhrx- Weakness
- CWE-190
- Updated
- 2026-11-02
OSV
9.8
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code and cause a denial of service that is similar to CVE-2017-9181.
- Record
CVE-2021-20308- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-20308
9.8
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code and cause a denial of service that is similar to CVE-2017-9181.
- Record
DEBIAN-CVE-2021-20308- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 9 moreShow less
OSVUBUNTU-CVE-2021-20308
9.8
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code and cause a denial of service that is similar to CVE-2017-9181.
- Record
UBUNTU-CVE-2021-20308- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2021-0332 No score
Updated htmldoc packages fix security vulnerabilities
Updated htmldoc packages fix security vulnerabilities:
Integer overflow in the htmldoc 1.9.11 and before may allow attackers to execute arbitrary code and cause a denial of service that is similar to CVE-2017-9181 (CVE-2021-20308).
AddressSanitizer: double-free in function pspdf_export ps-pdf.cxx (CVE-2021-23158).
AddressSanitizer: heap-buffer-overflow in pspdf_prepare_outpages() in ps-pdf.cxx (CVE-2021-23165).
AddressSanitizer: SEGV in file_extension file.c (CVE-2021-23180).
AddressSanitizer: SEGV on unknown address 0x000000000014 (CVE-2021-23191).
AddressSanitizer: stack-buffer-overflow in parse_table ps-pdf.cxx (CVE-2021-23206).
AddressSanitizer: heap-buffer-overflow in pspdf_prepare_page(int) ps-pdf.cxx (CVE-2021-26252).
AddressSanitizer: heap-buffer-overflow on render_table_row() ps-pdf.cxx (CVE-2021-26259).
SEGV on unknown address 0x000000000000 (CVE-2021-26948).
- Record
MGASA-2021-0332- Updated
- 2026-11-02
OSVopenSUSE-SU-2021:0882-1 No score
Security update for htmldoc
This update for htmldoc fixes the following issues:
htmldoc was updated to version 1.9.12:
- Fixed buffer-overflow CVE-2021-20308 ( boo#1184424 )
- Fixed a crash bug with 'data:' URIs and EPUB output
- Fixed several other crash bugs
- Fixed JPEG error handling
- Fixed some minor issues
- Removed the bundled libjpeg, libpng, and zlib.
update to 1.9.11:
- Added high-resolution desktop icons for Linux.
- Updated the internal HTTP library to fix truncation of redirection URLs
- Fixed a regression in the handling of character entities for UTF-8 input
- The
--numberedoption did not work when the table-of-contents was disabled - Updated local zlib to v1.2.11.
- Updated local libpng to v1.6.37.
- Fixed packaging issues on macOS and Windows
- Now ignore sRGB profile errors in PNG files
- The GUI would crash when saving
- Page comments are now allowed in
pretext
update to 1.9.9:
- Added support for a
HTMLDOC.filenameMETA keyword that controls the filename reported in CGI mode; the default remains 'htmldoc.pdf' (Issue #367) - Fixed a paragraph formatting issue with large inline images (Issue #369)
- Fixed a buffer underflow issue (Issue #370)
- Fixed PDF page numbers (Issue #371)
- Added support for a new
Lheader/footer format ($LETTERHEAD), which inserts a letterhead image at its full size (Issue #372, Issue #373, Issue #375) - Updated the build documentation (Issue #374)
- Refactored the PRE rendering code to work around compiler optimization bugs
- Added support for links with targets (Issue #351)
- Fixed a table rowspan + valign bug (Issue #360)
- Added support for data URIs (Issue #340)
- HTMLDOC no longer includes a PDF table of contents when converting a single web page (Issue #344)
- Updated the markdown support with external links, additional inline markup, and hard line breaks.
- Links in markdown text no longer render with a leading space as part of the link (Issue #346)
- Fixed a buffer underflow bug discovered by AddressSanitizer.
- Fixed a bug in UTF-8 support (Issue #348)
- PDF output now includes the base language of the input document(s)
- Optimized the loading of font widths (Issue #354)
- Optimized PDF page resources (Issue #356)
- Optimized the base memory used for font widths (Issue #357)
- Added proper
­support (Issue #361) - Title files can now be markdown.
- The GUI did not support EPUB output.
- Empty markdown table cells were not rendered in PDF or PostScript output.
- The automatically-generated title page now supports both 'docnumber' and 'version' metadata.
- Added support for dc:subject and dc:language metadata in EPUB output from the HTML keywords and lang values.
- Added support for the subject and language metadata in markdown input.
- Fixed a buffer underflow bug (Issue #338)
htmldoc --helpnow reports whether HTTPS URLs are supported (Issue #339)- Fixed an issue with HTML title pages and EPUB output.
- Inline fixed-width text is no longer reduced in size automatically
- Optimized initialization of font width data (Issue #334)
- Fixed formatting bugs with aligned images (Issue #322, Issue #324)
- Fixed support for three digit '#RGB' color values (Issue #323)
- Fixed character set support for markdown metadata.
- Updated libpng to v1.6.34 (Issue #326)
- The makefiles did not use the CPPFLAGS value (Issue #328)
- Added Markdown table support.
- Fixed parsing of TBODY, TFOOT, and THEAD elements in HTML files.
- Record
openSUSE-SU-2021:0882-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2021:0893-1 No score
Security update for htmldoc
This update for htmldoc fixes the following issues:
htmldoc was updated to version 1.9.12
- Fixed buffer-overflow CVE-2021-20308 ( boo#1184424 )
- Fixed a crash bug with 'data:' URIs and EPUB output
- Fixed several other crash bugs
- Fixed JPEG error handling
- Fixed some minor issues
- Removed the bundled libjpeg, libpng, and zlib.
update to 1.9.11:
- Added high-resolution desktop icons for Linux.
- Updated the internal HTTP library to fix truncation of redirection URLs
- Fixed a regression in the handling of character entities for UTF-8 input
- The
--numberedoption did not work when the table-of-contents was disabled - Updated local zlib to v1.2.11.
- Updated local libpng to v1.6.37.
- Fixed packaging issues on macOS and Windows
- Now ignore sRGB profile errors in PNG files
- The GUI would crash when saving
- Page comments are now allowed in
pretext
update to 1.9.9:
- Added support for a
HTMLDOC.filenameMETA keyword that controls the filename reported in CGI mode; the default remains 'htmldoc.pdf' (Issue #367) - Fixed a paragraph formatting issue with large inline images (Issue #369)
- Fixed a buffer underflow issue (Issue #370)
- Fixed PDF page numbers (Issue #371)
- Added support for a new
Lheader/footer format ($LETTERHEAD), which inserts a letterhead image at its full size (Issue #372, Issue #373, Issue #375) - Updated the build documentation (Issue #374)
- Refactored the PRE rendering code to work around compiler optimization bugs
- Added support for links with targets (Issue #351)
- Fixed a table rowspan + valign bug (Issue #360)
- Added support for data URIs (Issue #340)
- HTMLDOC no longer includes a PDF table of contents when converting a single web page (Issue #344)
- Updated the markdown support with external links, additional inline markup, and hard line breaks.
- Links in markdown text no longer render with a leading space as part of the link (Issue #346)
- Fixed a buffer underflow bug discovered by AddressSanitizer.
- Fixed a bug in UTF-8 support (Issue #348)
- PDF output now includes the base language of the input document(s)
- Optimized the loading of font widths (Issue #354)
- Optimized PDF page resources (Issue #356)
- Optimized the base memory used for font widths (Issue #357)
- Added proper
­support (Issue #361) - Title files can now be markdown.
- The GUI did not support EPUB output.
- Empty markdown table cells were not rendered in PDF or PostScript output.
- The automatically-generated title page now supports both 'docnumber' and 'version' metadata.
- Added support for dc:subject and dc:language metadata in EPUB output from the HTML keywords and lang values.
- Added support for the subject and language metadata in markdown input.
- Fixed a buffer underflow bug (Issue #338)
htmldoc --helpnow reports whether HTTPS URLs are supported (Issue #339)- Fixed an issue with HTML title pages and EPUB output.
- Inline fixed-width text is no longer reduced in size automatically
- Optimized initialization of font width data (Issue #334)
- Fixed formatting bugs with aligned images (Issue #322, Issue #324)
- Fixed support for three digit '#RGB' color values (Issue #323)
- Fixed character set support for markdown metadata.
- Updated libpng to v1.6.34 (Issue #326)
- The makefiles did not use the CPPFLAGS value (Issue #328)
- Added Markdown table support.
- Fixed parsing of TBODY, TFOOT, and THEAD elements in HTML files.
- Record
openSUSE-SU-2021:0893-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2021:0895-1 No score
Security update for htmldoc
This update for htmldoc fixes the following issues:
Update to version 1.9.12
- Fixed buffer-overflow CVE-2021-20308 ( boo#1184424 )
- Fixed a crash bug with 'data:' URIs and EPUB output
- Fixed several other crash bugs
- Fixed JPEG error handling
- Fixed some minor issues
- Removed the bundled libjpeg, libpng, and zlib.
update to 1.9.11:
- Added high-resolution desktop icons for Linux.
- Updated the internal HTTP library to fix truncation of redirection URLs
- Fixed a regression in the handling of character entities for UTF-8 input
- The
--numberedoption did not work when the table-of-contents was disabled - Updated local zlib to v1.2.11.
- Updated local libpng to v1.6.37.
- Fixed packaging issues on macOS and Windows
- Now ignore sRGB profile errors in PNG files
- The GUI would crash when saving
- Page comments are now allowed in
pretext
update to 1.9.9:
- Added support for a
HTMLDOC.filenameMETA keyword that controls the filename reported in CGI mode; the default remains 'htmldoc.pdf' (Issue #367) - Fixed a paragraph formatting issue with large inline images (Issue #369)
- Fixed a buffer underflow issue (Issue #370)
- Fixed PDF page numbers (Issue #371)
- Added support for a new
Lheader/footer format ($LETTERHEAD), which inserts a letterhead image at its full size (Issue #372, Issue #373, Issue #375) - Updated the build documentation (Issue #374)
- Refactored the PRE rendering code to work around compiler optimization bugs
- Added support for links with targets (Issue #351)
- Fixed a table rowspan + valign bug (Issue #360)
- Added support for data URIs (Issue #340)
- HTMLDOC no longer includes a PDF table of contents when converting a single web page (Issue #344)
- Updated the markdown support with external links, additional inline markup, and hard line breaks.
- Links in markdown text no longer render with a leading space as part of the link (Issue #346)
- Fixed a buffer underflow bug discovered by AddressSanitizer.
- Fixed a bug in UTF-8 support (Issue #348)
- PDF output now includes the base language of the input document(s)
- Optimized the loading of font widths (Issue #354)
- Optimized PDF page resources (Issue #356)
- Optimized the base memory used for font widths (Issue #357)
- Added proper
­support (Issue #361) - Title files can now be markdown.
- The GUI did not support EPUB output.
- Empty markdown table cells were not rendered in PDF or PostScript output.
- The automatically-generated title page now supports both 'docnumber' and 'version' metadata.
- Added support for dc:subject and dc:language metadata in EPUB output from the HTML keywords and lang values.
- Added support for the subject and language metadata in markdown input.
- Fixed a buffer underflow bug (Issue #338)
htmldoc --helpnow reports whether HTTPS URLs are supported (Issue #339)- Fixed an issue with HTML title pages and EPUB output.
- Inline fixed-width text is no longer reduced in size automatically
- Optimized initialization of font width data (Issue #334)
- Fixed formatting bugs with aligned images (Issue #322, Issue #324)
- Fixed support for three digit '#RGB' color values (Issue #323)
- Fixed character set support for markdown metadata.
- Updated libpng to v1.6.34 (Issue #326)
- The makefiles did not use the CPPFLAGS value (Issue #328)
- Added Markdown table support.
- Fixed parsing of TBODY, TFOOT, and THEAD elements in HTML files.
- Record
openSUSE-SU-2021:0895-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2021:1266-1 No score
Security update for htmldoc
This update for htmldoc fixes the following issues:
-
CVE-2021-20308: Fixed crash bug with bad GIFs, ( boo#1184424 )
-
Fixed license, package is GPL 2+ not LGPL
- Record
openSUSE-SU-2021:1266-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:10848-1 No score
htmldoc-1.9.12-1.2 on GA media
These are all security issues fixed in the htmldoc-1.9.12-1.2 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:10848-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:14898-1 No score
Security update for htmldoc
This update for htmldoc fixes the following issues:
- CVE-2019-19630: Fixed stack-based buffer overflow in the hd_strlcpy() function in string.c via a crafted HTML document (bsc#1158802).
- CVE-2021-20308: Fixed integer overflow in image_load_gif() (bsc#1184424).
- CVE-2022-0534: Fixed stack out-of-bounds read in gif_get_code() when opening a malicious GIF file results in a segmentation fault (bsc#1195758).
- Record
SUSE-SU-2022:14898-1- Updated
- 2026-11-02
OSVUSN-7189-1 No score
HTMLDOC vulnerabilities
It was discovered that HTMLDOC incorrectly handled certain inputs, which could lead to an integer overflow. An attacker could potentially use this issue to cause a denial of service or execute arbitrary code. (CVE-2021-20308)
It was discovered that HTMLDOC incorrectly handled memory in pspdf_export, which could lead to a double-free. An attacker could potentially use this issue to cause a denial of service or execute arbitrary code. (CVE-2021-23158)
It was discovered that HTMLDOC incorrectly handled memory when loading a JPEG image, which could lead to a NULL pointer dereference. An attacker could potentially use this issue to cause a denial of service. (CVE-2021-23191, CVE-2021-26948)
It was discovered that HTMLDOC incorrectly handled certain inputs, which could lead to a stack buffer overflow. An attacker could potentially use this issue to cause a denial of service or execute arbitrary code. (CVE-2021-23206, CVE-2021-40985, CVE-2021-43579)
It was discovered that HTMLDOC incorrectly handled memory in pdpdf_prepare_page and render_table_row, which could lead to a heap buffer overflow. An attacker could potentially use this issue to cause a denial of service or execute arbitrary code. (CVE-2021-26252, CVE-2021-26259)
It was discovered that HTMLDOC incorrectly handled memory in parse_paragraph, which could lead to a heap buffer overflow. An attacker could potentially use this issue to cause a denial of service or execute arbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2021-34119)
It was discovered that HTMLDOC incorrectly handled memory in parse_tree. An attacker could potentially use this issue to leak sensitive information. (CVE-2021-34121)
- Record
USN-7189-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
htmldocDebian:12 |
before 1.9.11-3 | 1.9.11-3 |
htmldocDebian:13 |
before 1.9.11-3 | 1.9.11-3 |
htmldocDebian:14 |
before 1.9.11-3 | 1.9.11-3 |
htmldocDebian:9 From an advisory covering 10 CVEs |
before 1.8.27-8+deb9u1, plus listed versions 1.8.27-8 |
1.8.27-8+deb9u1 |
htmldocMageia:7 From an advisory covering 9 CVEs |
before 1.9.3-2.3.mga7 | 1.9.3-2.3.mga7 |
htmldocMageia:8 From an advisory covering 9 CVEs |
before 1.9.8-1.2.mga8 | 1.9.8-1.2.mga8 |
htmldocSUSE:Subscription Management Tool 11 SP3 From an advisory covering 3 CVEs |
before 1.8.27-170.4.9.1 | 1.8.27-170.4.9.1 |
htmldocUbuntu:Pro:14.04:LTS |
before 1.8.27-8ubuntu1+esm3, plus listed versions 1.8.27-8ubuntu11.8.27-8ubuntu1+esm11.8.27-8ubuntu1+esm2 |
1.8.27-8ubuntu1+esm3 |
htmldocUbuntu:Pro:16.04:LTS |
before 1.8.27-8ubuntu1.1+esm2, plus listed versions 1.8.27-8ubuntu11.8.27-8ubuntu1.11.8.27-8ubuntu1.1+esm1 |
1.8.27-8ubuntu1.1+esm2 |
htmldocUbuntu:Pro:18.04:LTS |
before 1.9.2-1ubuntu0.2+esm1, plus listed versions 1.8.27-8ubuntu21.8.27-8ubuntu31.9.2-11.9.2-1ubuntu0.11.9.2-1ubuntu0.2 |
1.9.2-1ubuntu0.2+esm1 |
Show 10 moreShow less
| Package | Affected | Fixed |
|---|---|---|
htmldocUbuntu:Pro:20.04:LTS |
before 1.9.7-1ubuntu0.3+esm1, plus listed versions 1.9.3-11.9.7-11.9.7-1build11.9.7-1ubuntu0.21.9.7-1ubuntu0.3 |
1.9.7-1ubuntu0.3+esm1 |
htmldocUbuntu:Pro:14.04:LTS From an advisory covering 11 CVEs |
before 1.8.27-8ubuntu1+esm3, plus listed versions 1.8.27-8ubuntu11.8.27-8ubuntu1+esm11.8.27-8ubuntu1+esm2 |
1.8.27-8ubuntu1+esm3 |
htmldocUbuntu:Pro:16.04:LTS From an advisory covering 11 CVEs |
before 1.8.27-8ubuntu1.1+esm2, plus listed versions 1.8.27-8ubuntu11.8.27-8ubuntu1.11.8.27-8ubuntu1.1+esm1 |
1.8.27-8ubuntu1.1+esm2 |
htmldocUbuntu:Pro:18.04:LTS From an advisory covering 11 CVEs |
before 1.9.2-1ubuntu0.2+esm1, plus listed versions 1.8.27-8ubuntu21.8.27-8ubuntu31.9.2-11.9.2-1ubuntu0.11.9.2-1ubuntu0.2 |
1.9.2-1ubuntu0.2+esm1 |
htmldocUbuntu:Pro:20.04:LTS From an advisory covering 11 CVEs |
before 1.9.7-1ubuntu0.3+esm1, plus listed versions 1.9.3-11.9.7-11.9.7-1build11.9.7-1ubuntu0.21.9.7-1ubuntu0.3 |
1.9.7-1ubuntu0.3+esm1 |
htmldocopenSUSE:Leap 15.2 |
before 1.9.12-lp152.4.3.1 | 1.9.12-lp152.4.3.1 |
htmldocSUSE:Package Hub 15 SP2 |
before 1.9.12-bp152.4.3.1 | 1.9.12-bp152.4.3.1 |
htmldocSUSE:Package Hub 15 SP1 |
before 1.9.12-bp151.4.3.1 | 1.9.12-bp151.4.3.1 |
htmldocSUSE:Package Hub 12 SP1 |
before 1.8.28-6.1 | 1.8.28-6.1 |
htmldocopenSUSE:Tumbleweed |
before 1.9.12-1.2 | 1.9.12-1.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases, products | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-20308 is a critical vulnerability (CVSS 9.8) in Htmldoc Project Htmldoc, published April 5, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.48%, the 84th percentile. Fixed in htmldoc 1.9.11-3.
References
github.com/michaelrsweet/htmldoc/issues/423
bugzilla.redhat.com/show_bug.cgi?id=1946289
lists.debian.org/debian-lts-announce/2021/07/msg00000.html
nvd.nist.gov/vuln/detail/CVE-2021-20308
github.com/advisories/GHSA-pmv7-7c58-mhrx
security-tracker.debian.org/tracker/CVE-2021-20308
Show 28 moreShow less
advisories.mageia.org/MGASA-2021-0332.html
bugs.mageia.org/show_bug.cgi?id=29161
bugs.mageia.org/show_bug.cgi?id=29101
debian.org/security/2021/dsa-4928
lists.opensuse.org/archives/list/[email protected]/thread/RXMQHLXPNKTCGM4HNTMLHF7NWL3ZXKIO
suse.com/support/update/announcement/2022/suse-su-202214898-1
bugzilla.suse.com/1158802
bugzilla.suse.com/1184424
bugzilla.suse.com/1195758
suse.com/security/cve/CVE-2019-19630
suse.com/security/cve/CVE-2021-20308
suse.com/security/cve/CVE-2022-0534
ubuntu.com/security/CVE-2021-20308
cve.org/CVERecord?id=CVE-2021-20308
ubuntu.com/security/notices/USN-7189-1
ubuntu.com/security/CVE-2021-23158
ubuntu.com/security/CVE-2021-23191
ubuntu.com/security/CVE-2021-23206
ubuntu.com/security/CVE-2021-26252
ubuntu.com/security/CVE-2021-26259
ubuntu.com/security/CVE-2021-26948
ubuntu.com/security/CVE-2021-34119
ubuntu.com/security/CVE-2021-34121
ubuntu.com/security/CVE-2021-40985
ubuntu.com/security/CVE-2021-43579
lists.opensuse.org/archives/list/[email protected]/thread/JPXU4F6ZSTM4YH5LRPXTC4IKPPHYHIMX
lists.opensuse.org/archives/list/[email protected]/thread/SBHXPTEDODFUJSSP4XPVQOKK5PUKOPN6
lists.opensuse.org/archives/list/[email protected]/thread/CULAAKX3HOT4A6XWUQNE3XVTQ7FRWP5M