Repository navigation
·
1 commit
to master
since this release
This release addresses denial-of-service and cross-site scripting vulnerabilities, adds table-rendering safeguards, support for lxml 6.2 and improves static analysis and documentation.
Security fixes
- Ragged tables: Calculate column widths in linear time over existing cells, avoiding quadratic CPU consumption. See GHSA-vmxw-xvww-46f9.
- Rendering amplification: Cap rendered prefix padding at 256 characters and limit estimated output size per table to prevent excessive allocations. See GHSA-m6p9-2jq4-55qw and GHSA-hx8g-p7p2-7ffq.
- Annotation output: Escape extracted text in HTML and XML annotation output, preventing decoded text from becoming active markup. See GHSA-p3pp-6p82-qc22. Annotation labels are not escaped and should come from trusted rules.
Improvements
- Configure the per-table output limit with
ParserConfig(max_table_output_size=...)or the new--max-table-output-sizecommand-line option. The default is 1,000,000 characters; exceeding the estimated limit raisesTableOutputLimitError. - Expanded the supported
lxmldependency range to>=5.4.0,<7.0.0. - Improved resource-limit documentation, type annotations, formatting, and static analysis.
Compatibility and upgrade notes
- Large tables may now raise
TableOutputLimitError. If needed, increase the limit withParserConfig(max_table_output_size=...)or--max-table-output-size. - Deeply indented content may render differently because prefix padding is capped at 256 characters.
- HTML and XML annotation output now escape extracted text, so serialized output may differ.
- The table limit is an estimate, not a global memory or processing-time limit. Apply additional resource limits when processing untrusted HTML.
Acknowledgements
Many thanks to the following contributors who responsibly disclosed these issues and helped improve the security of inscriptis
- @g4lb for GHSA-vmxw-xvww-46f9, including the patch and regression test.
- @shubtheone for GHSA-m6p9-2jq4-55qw and GHSA-p3pp-6p82-qc22, and for providing input on how to address these issues.
- @lanjianchun for GHSA-hx8g-p7p2-7ffq.