Skip to content

Security Hardening, Table Rendering Safeguards, and lxml 6.2 Support

Latest

Choose a tag to compare

@AlbertWeichselbraun AlbertWeichselbraun released this 04 Dec 11:50
· 1 commit to master since this release
8bc787d

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-size command-line option. The default is 1,000,000 characters; exceeding the estimated limit raises TableOutputLimitError.
  • Expanded the supported lxml dependency 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 with ParserConfig(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