CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-132277

CVE-2026-132277: Quadratic Memory Growth and Denial of Service in Inscriptis HTML-to-Text Library

Amit Schendel
Amit Schendel
Senior Security Researcher

Nov 21, 2026·10 min read·2 visits

Executive Summary (TL;DR)

An unbalanced prefix stack operation in Inscriptis versions 2.0.0 through 2.7.5 causes sibling <table> tags within a block-level parent element to accumulate indentation quadratically. Processing an HTML payload of approximately 240 KB containing 16,000 empty sibling tables generates roughly 1 billion characters (~1 GB of memory), resulting in denial of service. Users must upgrade to version 2.7.6.

CVE-2026-132277 (also tracked as GHSA-q87h-c5m7-659j) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Inscriptis Python library (versions 2.0.0 through 2.7.5). When rendering sibling HTML table elements inside a block-level parent container, the parser fails to pop the parent block's inline padding prefix from the internal canvas prefix stack upon closing the block. Consequently, each subsequent sibling table inherits and accumulates the indentation prefixes of all preceding tables. This causes the output string length and memory allocation of get_text() to grow quadratically with the number of sibling tables, allowing a compact untrusted HTML payload to trigger denial of service via memory exhaustion.

Vulnerability Overview

inscriptis is an open-source Python library developed by weblyzard for converting HTML DOM trees into clean, formatted plain-text strings. Unlike basic tag-stripping utilities, inscriptis preserves structural layout features of HTML documents, including CSS margins, block padding, list item indentation, and two-dimensional table formatting. Because of its ability to retain visual layout semantics in plain text, the library is frequently integrated into automated web crawlers, search indexing pipelines, retrieval-augmented generation (RAG) data ingestion workflows, and RESTful conversion microservices such as inscriptis-api.

In versions 2.0.0 through 2.7.5, inscriptis contains an algorithmic complexity vulnerability classified under CWE-400 (Uncontrolled Resource Consumption) and CWE-407 (Inefficient Algorithmic Complexity). The defect resides in how the rendering engine manages block-level indentation prefixes during the serialization of <table> elements. When a document contains multiple sibling <table> tags nested inside a block-level parent container (such as <ul>, <ol>, or <div>), the state machine fails to clean up the parent container's inline padding entry on the internal prefix stack after rendering each table.

Because these stale padding entries remain on the stack, every sibling table processed after the first inherits the accumulated indentation of all preceding sibling tables. As the parser iterates over $N$ consecutive sibling tables, the horizontal padding prepended to each rendered table scales linearly with the table's index $k$, causing the total character output and memory consumption of inscriptis.get_text() to scale quadratically ($O(N^2)$).

This behavior exposes applications that parse untrusted HTML to unauthenticated denial-of-service (DoS) attacks. An attacker can supply a relatively small HTML document—for example, a 240 KB file containing 16,000 empty <table></table> pairs inside a <ul> element—and force the Python interpreter to allocate approximately 1,000,000,000 characters (~1 GB of RAM), exhausting system memory or stalling worker threads.

Root Cause Analysis

To maintain visual fidelity when converting HTML to plain text, inscriptis uses a stateful rendering engine centered around HtmlDocumentState, HtmlElement, and Canvas objects. As the parser traverses the HTML tree, it maintains a tag stack (state.tags) and tracks horizontal indentation using a prefix stack (canvas.current_block.prefix). When an HTML element with inline padding or list indentation is opened, its padding string is pushed onto this prefix stack so that child lines are properly indented.

The vulnerability is triggered during the transition between table rendering and parent block handling. In inscriptis, HTML tables are rendered into an isolated two-dimensional grid representation (Table). When the parser encounters a closing </table> tag, it invokes table_end_handler(state: HtmlDocumentState) in src/inscriptis/model/tag/table_tag.py. This function retrieves the rendered string representation of the current table (table.get_text()) and writes it into the enclosing parent element (state.tags[-2]) by calling HtmlElement.write_verbatim_text() in src/inscriptis/model/html_element.py.

Inside HtmlElement.write_verbatim_text(), the method checks whether the element is a block-level container (self.display == Display.block). When the parent element of the <table> is block-level, write_verbatim_text() calls self.canvas.open_block(self) before writing the verbatim table lines, and subsequently calls self.canvas.close_block(self) once the lines are emitted. The critical architectural mismatch occurs between these two canvas methods:

While Canvas.open_block() registers and pushes the parent element's padding_inline onto canvas.current_block.prefix, Canvas.close_block() does not remove it. In the inscriptis design, prefix removal via prefix.remove_last_prefix() was exclusively performed inside Canvas.close_tag(), which executes only when the HTML tag itself closes in the DOM. Because write_verbatim_text() synthetically opens and closes a block on the still-open parent element without closing the parent tag itself, the pushed prefix entry is leaked onto the stack.

When a block-level parent element contains $N$ sibling <table> tags, the parent tag remains open across all $N$ iterations. For the $k$-th sibling table ($1 \le k \le N$), write_verbatim_text() pushes a new copy of the parent's padding_inline onto the stack without removing the previous $k-1$ copies. The characters emitted for table $k$ are therefore indented by $k$ times the parent's padding width. Summing across all $N$ tables yields an arithmetic progression $\sum_{k=1}^{N} k = \frac{N(N+1)}{2}$, transforming what should be an $O(N)$ linear text conversion into an $O(N^2)$ quadratic memory and CPU amplification.

Code Analysis

The defect was introduced in commit 5e5fcc3f54192fe38909005b3b8720d7d4022e6c (version 2.0.0) and remained present through version 2.7.5. In src/inscriptis/model/tag/table_tag.py, table_end_handler() pops the completed table from the document state, writes its formatted text into the parent element (state.tags[-2]), and transfers any in-table text annotations back to the parent canvas.

Prior to the fix, table_end_handler() terminated immediately after transferring annotations, leaving the prefix pushed by write_verbatim_text() on state.tags[-2].canvas.current_block.prefix. Commit dc122894cd671a0227f8fdad60464acddaf40fc8 resolves the issue by explicitly popping the last prefix from the parent canvas's current block after annotation offsets are calculated, provided the parent element has Display.block.

diff --git a/src/inscriptis/model/tag/table_tag.py b/src/inscriptis/model/tag/table_tag.py
index e634567..a123456 100644
--- a/src/inscriptis/model/tag/table_tag.py
+++ b/src/inscriptis/model/tag/table_tag.py
@@ -1,6 +1,7 @@
 """Handle the <table>, <tr> and <td> tags."""
 
 from inscriptis.annotation import Annotation
+from inscriptis.html_properties import Display
 from inscriptis.model.canvas import Canvas
 from inscriptis.model.html_document_state import HtmlDocumentState
 from inscriptis.model.table import Table, TableCell
@@ -63,3 +64,8 @@ def table_end_handler(state: HtmlDocumentState) -> None:
 
     # transfer in-table annotations
     state.tags[-2].canvas.annotations.extend(table.get_annotations(start_idx, state.tags[-2].canvas.left_margin))
+
+    # write_verbatim_text() opened a block whose prefix is read above for the
+    # annotation offsets; drop it now so sibling tables do not accumulate padding
+    if state.tags[-2].display == Display.block:
+        state.tags[-2].canvas.current_block.prefix.remove_last_prefix()

The placement of remove_last_prefix() in table_end_handler() is deliberate. When table.get_annotations(start_idx, state.tags[-2].canvas.left_margin) is called on line 66, state.tags[-2].canvas.left_margin reads the active prefix stack to compute character offset shifts for annotations inside padded blocks. If the prefix had been popped inside HtmlElement.write_verbatim_text() or Canvas.close_block() prior to table.get_annotations(), the calculated annotation start and end offsets for tables inside padded containers (such as <div style="padding-left:4em">) would be misaligned relative to the rendered text.

> [!NOTE] > To verify fix completeness and ensure annotation alignment was preserved, the maintainers added three unit tests in tests/test_sibling_table_indentation.py: test_sibling_tables_keep_indentation (verifying uniform line lengths across sibling tables), test_sibling_tables_output_is_linear (verifying linear scaling across 2,000 sibling tables), and test_table_annotation_offsets_are_not_shifted_by_padding (verifying that get_annotated_text() indices remain exact inside padded blocks).

Because write_verbatim_text() is specifically invoked by table_end_handler() for rendering sub-tables into parent elements, balancing the prefix stack directly at the end of table_end_handler() closes the leak path without altering the lifecycle of standard HTML tags managed by Canvas.close_tag().

Exploitation

Exploiting CVE-2026-132277 requires no authentication, special privileges, or non-default configuration in inscriptis. The sole prerequisite is that the target application passes attacker-controlled HTML input to inscriptis.get_text() or inscriptis.get_annotated_text(). Even empty <table></table> tags trigger the bug when placed inside a block-level parent element that carries inline padding or margin indentation (such as <ul> or <div>).

A minimal local proof-of-concept (harness.py from the public verification repository googlesky/CVE-2026-132277) demonstrates the quadratic expansion by generating $N$ empty sibling tables inside an unordered list (<ul>) and measuring the resulting character count, execution time, and peak resident set size (RSS):

#!/usr/bin/env python3
import json, sys, time, resource
from inscriptis import get_text
 
n = int(sys.argv[1]) if len(sys.argv) > 1 else 3000
html = "<ul>" + "<table></table>" * n + "</ul>"
 
t0 = time.time()
err = ""
out_len = 0
try:
    out = get_text(html)
    out_len = len(out)
except Exception as e:
    err = f"{type(e).__name__}: {e}"[:140]
 
elapsed = time.time() - t0
rss_mib = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss // 1024
print(json.dumps({
    "n": n,
    "html_bytes": len(html),
    "output_chars": out_len,
    "elapsed": round(elapsed, 3),
    "peak_rss_mib": rss_mib,
    "error": err
}))

Empirical benchmarks comparing the vulnerable release (inscriptis 2.7.5) against the patched release (inscriptis 2.7.6) confirm the quadratic growth curve:

Sibling Tables ($N$)Input HTML SizeVulnerable Output (2.7.5)Patched Output (2.7.6)Vulnerable Expansion Ratio
500~7.5 KB1,006,999 chars8,999 chars~134x
1,000~15 KB4,013,999 chars17,999 chars~267x
2,000~30 KB16,027,999 chars35,999 chars~534x
8,000~120 KB256,111,999 chars (506 MiB RSS)~144,000 chars~2,134x
16,000~240 KB~1,000,000,000 chars (~1 GB RSS)~288,000 chars~4,200x

As shown in the benchmark data, doubling the number of sibling tables in version 2.7.5 quadruples the output string size. At $N = 8,000$ (approximately 120 KB of raw HTML), get_text() allocates over 256 million characters and consumes 506 MiB of peak RSS memory. At $N = 16,000$ (~240 KB of HTML), output expands to roughly 1 billion characters (~1 GB of RAM), allowing single or concurrent requests to trigger Out-Of-Memory (OOM) terminations in Python web workers or ingestion daemons.

Impact Assessment

CVE-2026-132277 is assigned a CVSS v3.1 base score of 5.3 (Medium) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L. The Attack Vector is Network (AV:N) and Attack Complexity is Low (AC:L), reflecting that any network-accessible service accepting HTML documents or fetching external URLs for text extraction can be targeted without authentication (PR:N) or user interaction (UI:N).

The vulnerability does not permit arbitrary code execution, memory corruption, or unauthorized data disclosure (C:N/I:N). The sole security impact is on system availability (A:L in the official CNA assessment, though practical impact on constrained containers or single-worker services can reach full service disruption). Because Python strings are stored contiguously in heap memory, building and concatenating multi-hundred-megabyte strings inside get_text() simultaneously monopolizes CPU cycles (holding the Python Global Interpreter Lock in multi-threaded processes) and rapidly exhausts available system RAM.

Downstream systems most at risk include:

  • Web Crawlers and Scraping Pipelines: Automated agents using inscriptis to extract clean text from arbitrary third-party web pages can be stalled or crashed by a maliciously hosted page.
  • LLM / RAG Data Ingestion Pipelines: Document processing workers that convert user-submitted HTML files or emails into plain text chunks for vector embedding can suffer OOM crashes.
  • Conversion Microservices: Public or internal instances of inscriptis-api or similar Flask/FastAPI wrappers that expose get_text() over HTTP without strict input structure validation.

At the time of analysis, CVE-2026-132277 is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, has no associated ransomware campaigns, and has not yet been assigned an EPSS score. However, functional proof-of-concept exploit code is publicly available on GitHub (googlesky/CVE-2026-132277).

Remediation

The definitive remediation for CVE-2026-132277 is to upgrade inscriptis to version 2.7.6 or later. Version 2.7.6 incorporates commit dc122894cd671a0227f8fdad60464acddaf40fc8, which properly removes the temporary block prefix after each table is rendered into a block-level parent element, restoring linear $O(N)$ time and memory complexity.

Administrators and developers can upgrade the package via pip:

pip install --upgrade "inscriptis>=2.7.6"

For environments where upgrading the package dependency is restricted, the fix can be backported directly to src/inscriptis/model/tag/table_tag.py by importing Display from inscriptis.html_properties and appending the prefix cleanup check to the end of table_end_handler():

from inscriptis.html_properties import Display
 
def table_end_handler(state: HtmlDocumentState) -> None:
    # ... existing table rendering and annotation transfer logic ...
    state.tags[-2].canvas.annotations.extend(
        table.get_annotations(start_idx, state.tags[-2].canvas.left_margin)
    )
    if state.tags[-2].display == Display.block:
        state.tags[-2].canvas.current_block.prefix.remove_last_prefix()

> [!NOTE] > In addition to applying the patch, services that process untrusted HTML from external sources should implement defense-in-depth controls. Recommended hardening measures include enforcing strict maximum payload size limits on incoming HTML, pre-filtering or rejecting HTML documents with anomalous counts of <table tags (e.g., more than several hundred tables in a single document), and running HTML-to-text conversion tasks inside isolated worker processes with explicit OS-level memory limits (RLIMIT_AS / container cgroup limits) and execution timeouts.

Official Patches

weblyzardOfficial patch commit in weblyzard/inscriptis
weblyzardInscriptis 2.7.6 release tag
GitHub Advisory DatabaseOfficial GitHub Security Advisory GHSA-q87h-c5m7-659j

Fix Analysis (1)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected Systems

weblyzard inscriptis (Python library, versions 2.0.0 through 2.7.5)inscriptis-api web service instances using inscriptis < 2.7.6Python web crawlers, RAG/LLM ingestion pipelines, and HTML-to-text services utilizing inscriptis >= 2.0.0, < 2.7.6

Affected Versions Detail

Product
Affected Versions
Fixed Version
inscriptis
weblyzard
>= 2.0.0, < 2.7.62.7.6
AttributeDetail
Vulnerability IDCVE-2026-132277 / GHSA-q87h-c5m7-659j
Weakness ClassCWE-400 (Uncontrolled Resource Consumption) / CWE-407 (Algorithmic Complexity)
CVSS v3.1 Score5.3 Medium (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L)
Affected Versionsinscriptis >= 2.0.0, < 2.7.6
Patched Versioninscriptis 2.7.6
Attack VectorNetwork / Untrusted HTML Input containing sibling <table> tags
ImpactDenial of Service via O(N^2) quadratic memory and CPU exhaustion
Exploit & KEV StatusPublic PoC Available; Not Listed in CISA KEV

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-400
Uncontrolled Resource Consumption

The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Known Exploits & Detection

GitHubPublic proof-of-concept repository containing local Python reproduction harness and remote verification scripts demonstrating quadratic memory exhaustion in inscriptis 2.0.0-2.7.5.

Vulnerability Timeline

Security patch committed (dc122894cd671a0227f8fdad60464acddaf40fc8) by gistrec to balance the verbatim-text block prefix.
2026-10-20
Inscriptis version 2.7.6 released containing the fix.
2026-10-23
GitHub Security Advisory GHSA-q87h-c5m7-659j and CVE-2026-132277 officially published and synchronized with NVD.
2026-11-20
Public PoC repository (googlesky/CVE-2026-132277) published on GitHub.
2026-11-21

References & Sources

  • [1]CVE-2026-132277 Official CVE Record
  • [2]GitHub Security Advisory GHSA-q87h-c5m7-659j
  • [3]Official Fix Commit (dc122894cd671a0227f8fdad60464acddaf40fc8)
  • [4]Inscriptis Release 2.7.6
  • [5]NVD Vulnerability Detail: CVE-2026-132277
  • [6]CVE List v5 JSON Record for CVE-2026-132277
  • [7]Public PoC and Verification Repository (googlesky/CVE-2026-132277)
  • [8]MITRE ATT&CK Reference Search

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•CVE-2026-132276
5.9

CVE-2026-132276: Polynomial-Time Regular Expression Denial of Service (ReDoS) in wcmatch

CVE-2026-132276 (GHSA-53pm-wgxf-c6qf) is an algorithmic complexity and Regular Expression Denial of Service (ReDoS) vulnerability in the Python wcmatch wildcard and glob matching library prior to version 11.2. Under default flags, matching a non-matching attacker-controlled filename against a static developer-defined pattern containing multiple star (*) wildcards separated by literal delimiters causes polynomial-time backtracking O(n^k) in the compiled regular expression. A single 255-byte filename evaluated against a 5-star pattern consumes approximately 86 seconds of 100% CPU time, allowing unauthenticated attackers to induce severe availability degradation.

Alon Barad
Alon Barad
2 views•11 min read
•about 3 hours ago•CVE-2026-122244
7.7

CVE-2026-122244: Stored Cross-Site Scripting in Budibase Builder Formula Evaluation

CVE-2026-122244 (GHSA-r2q3-7m4h-63qg) is a high-severity cross-privilege Stored Cross-Site Scripting (XSS) vulnerability in Budibase prior to version 3.50.0. The flaw occurs due to defective character escaping in the JSON formatter utility combined with raw HTML rendering via Svelte's {@html} directive in the Budibase Builder interface. A low-privileged application user or an unauthenticated form visitor can store malicious HTML markup in a shared datasource, which subsequently executes arbitrary JavaScript in the browser session of an administrator or application builder inspecting Handlebars formula bindings.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 4 hours ago•CVE-2026-122247
8.2

CVE-2026-122247: Unauthenticated Global-Admin and Database Creation via Tenant-Confusion Bypass in Budibase

A tenant-confusion vulnerability in the user initialization endpoint of the Budibase worker service (prior to version 3.50.0) allows unauthenticated remote attackers to bypass the one-time administrative setup guard. By supplying arbitrary tenant identifiers in POST requests to /api/global/users/init, an attacker can force the underlying CouchDB datastore to dynamically provision unlimited tenant databases and persist latent global administrator accounts. This results in datastore resource exhaustion, denial of service, and unauthorized administrative account creation inside non-default tenant contexts.

Amit Schendel
Amit Schendel
5 views•9 min read
•about 5 hours ago•CVE-2026-103026
8.1

CVE-2026-103026: Arbitrary Method Invocation and State Tampering in Paymenter via Livewire HasConfirmation Trait

Paymenter versions prior to 1.5.7 contain an arbitrary method invocation vulnerability within the base Livewire component architecture. The application includes a legacy trait, HasConfirmation, inside app/Livewire/Component.php, which is inherited across 36 client-facing Livewire components. This trait exposes a public remote procedure call (RPC) endpoint named executeConfirmedAction without access controls or method allowlisting. Remote attackers can invoke arbitrary methods on any inheriting component, including Livewire's internal fill() method, enabling them to bypass #[Locked] property protections and manipulate internal component state and hydrated Eloquent models.

Alon Barad
Alon Barad
5 views•9 min read
•about 6 hours ago•CVE-2026-104885
6.3

CVE-2026-104885: Cross-Realm MQTT Session Disconnect via Missing Authorization in OpenRemote

OpenRemote prior to version 1.31.0 contains a Missing Authorization vulnerability (CWE-862) in the user management REST API endpoint responsible for disconnecting active MQTT sessions. The disconnectUserSession method in UserResourceImpl fails to verify whether the requesting user owns the target MQTT session, holds administrative privileges, or belongs to the realm specified in the request path. As a result, any authenticated user who obtains a valid MQTT session identifier can forcefully terminate active MQTT connections belonging to other users or IoT devices across any tenant realm.

Amit Schendel
Amit Schendel
5 views•9 min read
•about 7 hours ago•CVE-2026-69133
5.3

CVE-2026-69133: Cumulation Buffer Memory Retention in Netty OHTTP Codec

CVE-2026-69133 (GHSA-cg26-4c6j-2x8h) is a missing resource release vulnerability (CWE-772) in io.netty.incubator:netty-incubator-codec-ohttp affecting versions 0.0.20.Final through 0.0.26.Final. Both OHttpClientCodec and OHttpServerCodec retain the outer cumulationBuffer at its expanded high-water capacity after an Oblivious HTTP (OHTTP) exchange finishes. A remote unauthenticated attacker can complete a large OHTTP request or response over an HTTP keep-alive connection and leave the connection idle, pinning pooled or direct memory allocations across concurrent connections to induce denial of service.

Amit Schendel
Amit Schendel
4 views•8 min read