Skip to main content

SQL::Abstract::Tree CVE-2026-121008

| EUVDEUVD-2026-116928 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-11-04 CPANSec GHSA-fcg4-533h-9xx3
5.4
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Inject script payload into controlled bind value
  2. Delivery
    Application formats SQL with html profile
  3. Exploit
    Payload embedded unescaped in debug page
  4. Execution
    Admin or developer views the page
  5. Impact
    JavaScript executes in victim browser session

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a specific, non-default deployment: the application must use SQL::Abstract::Tree's 'html' profile and feed the output of format() directly into an HTML page - for example a debug panel or a rendered query log - without applying its own escaping, and the attacker must control a bind value or part of the SQL text. Limiting factors that reduce realistic risk: the html profile is a developer/debug-oriented feature not commonly exposed in production; a victim must actually view the rendered page (UI:R); and the vulnerability does not exist if the app escapes the output itself or uses the console profiles, which the evidence shows are not affected. The complete fix is upgrading to 2.000001_04, where the html profile enables html_escape by default; the evidence states no other mitigation.

Impact

This is a medium-severity, low-urgency issue rather than a top priority. The signals are internally consistent: CVSS 5.4 (medium), EPSS 0.17% at the 7th percentile (very low predicted exploitation probability), no CISA KEV listing, and a vendor/community priority of 'this_month' (not act_now or emergency). It is a stored/reflected cross-site scripting flaw (CWE-79) whose impact is confined to the browser of whoever views the rendered SQL. The official CVSS vector (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) treats exploitation as low-complexity with low privilege; however, exploitation is gated by a significant non-default precondition - the application must deliberately render SQL::Abstract::Tree's 'html' profile output straight into a web page (a debug panel or query log). In my independent assessment this configuration dependency is better captured as AC:H, and the attacker who merely supplies a malicious bind value often needs no application privilege (PR:N), so the official PR:L and my PR:N/AC:H framing differ on where the barrier lies - verify the deployment's actual data flow. Bottom line: real but narrow risk, appropriate to patch on a normal monthly cycle; the low EPSS and absence of KEV argue against emergency handling.

Exploit ScenarioDerived

An attacker submits input that becomes a bind value or part of the SQL text (for example a form field or search term containing '<script>alert(1)</script>'). Later a developer or administrator opens a debug panel or query log that renders that SQL through the html profile, and because format() does not HTML-escape the SQL text or bind values, the payload executes as JavaScript in the viewer's browser. No confirmed working public exploit was identified, though the vendor's own regression test in the fix commit demonstrates the '<script>alert(1)</script>' payload going into the page as-is.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 10, 2026

Cross-site scripting in the 'html' formatting profile of SQL::Abstract::Tree (Perl) before 2.000001_04 allows an attacker who controls a bind value or part of the SQL text to inject JavaScript into any page that renders format() output as-is, such as a debug panel or query log. Exploitation requires a non-default deployment in which the application feeds the html profile's output directly into an HTML page without its own escaping, and requires a victim to view the rendered page; EPSS is low at 0.17% (7th percentile), KEV status is not set, and no public exploit has been identified at time of analysis. This is a medium-severity, low-urgency issue rather than a top priority.

RemediationAI

Upgrade SQL::Abstract to 2.000001_04 or later, where the html profile enables the new html_escape option by default so bind values and SQL text are entity-encoded while the profile's own markup is preserved; the release is documented at https://metacpan.org/release/GETTY/SQL-Abstract-2.000001_04/changes and the fix can be reviewed in the patch at https://github.com/dbsrgits/sql-abstract/commit/85a75fcde3e09da5181dee07a4eccba76ad94305.patch. Do not set html_escape to 0 on the html profile, as that restores the vulnerable behaviour. The available evidence names no other vendor-supplied mitigation and describes upgrading as the complete fix; the practical limiting factors are that the html profile is a developer/debug-oriented feature, and that deployments which HTML-escape format() output in their own templates before rendering, or which use the console profiles (unaffected per the upstream test), are not exposed - though neither of those substitutes for installing 2.000001_04.

Affected ProductsAI

SQL::Abstract::Tree for Perl, all versions before 2.000001_04, are affected when the html profile is used to produce output that is rendered in a page; the fix ships in the SQL-Abstract-2.000001_04 release by GETTY (https://metacpan.org/release/GETTY/SQL-Abstract-2.000001_04/changes) via upstream commit 85a75fcde3e09da5181dee07a4eccba76ad94305 in the dbsrgits/sql-abstract repository (https://github.com/dbsrgits/sql-abstract/commit/85a75fcde3e09da5181dee07a4eccba76ad94305.patch). No CPE identifiers were supplied with the advisory data, so affected installations should be matched by module version rather than by CPE; the CPANSec report, the oss-security post (https://seclists.org/oss-sec/2026/q4/513) and the NVD entry (https://nvd.nist.gov/vuln/detail/CVE-2026-121008) are the primary references.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SQL::Abstract::Tree renders a parsed SQL statement as an abstract syntax tree and offers several output profiles; the 'html' profile deliberately emits markup, wrapping keywords in <span> elements and separating lines with <br />, so its output is intended to be embedded in a page verbatim. The format method and its internal _unparse/fill_in_placeholder routines inserted the original SQL text (identifiers, operators, function names) and the substituted bind values into that markup without any escaping, the classic CWE-79 pattern of untrusted data placed into an HTML context without encoding. The upstream fix (commit 85a75fc) adds a new html_escape attribute that the html profile enables by default and an _escape helper that converts &, <, >, " and ' into entities on the SQL text, operators and filled-in bind values, while leaving the profile's own span/br markup untouched; html_escape can be explicitly set to 0 to restore the previous behaviour, and the accompanying test shows the console profiles remain unescaped because their output is not HTML.

Know when Perl gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CPANSec) PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 4.7 MEDIUM

Unauthenticated attacker-supplied input (PR:N) but exploitation depends on the non-default html debug profile being rendered into a page (AC:H), requires a victim to view it (UI:R), and runs script in the browser (S:C, C:L/I:L).

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
CVSS changed
Nov 10, 2026 - 14:22 NVD
5.4 (MEDIUM)
CVE Published
Nov 04, 2026 - 14:36 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

SQL::Abstract::Tree versions before 2.000001_04 for Perl allow cross-site scripting via unescaped SQL text and bind values in the html profile.

The html profile wraps keywords and placeholders in span elements and breaks lines with br elements, so its output is meant to go into a page as is. The format method does not HTML-escape the SQL text or the bind values it fills in around that markup.

An application that renders SQL formatted with the html profile, such as in a debug panel or query log, allows an attacker who controls a bind value or part of the SQL text to embed JavaScript in the page.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Medium
popular Perl SQL library, but html debug profile rarely rendered in production
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Perl

View all
CVE-2012-6329 HIGH POC
7.5 Jan 04

The _compile function in Maketext.pm in the Locale::Maketext implementation in Perl before 5.17.7 does not properly hand

CVE-2017-12814 CRITICAL POC
9.8 Sep 28

Stack-based buffer overflow in the CPerlHost::Add method in win32/perlhost.h in Perl before 5.24.3-RC1 and 5.26.x before

CVE-2015-8608 CRITICAL POC
9.8 Feb 07

The VDir::MapPathA and VDir::MapPathW functions in Perl 5.22 allow remote attackers to cause a denial of service (out-of

CVE-2018-18314 CRITICAL POC
9.8 Dec 07

Perl before 5.26.3 has a buffer overflow via a crafted regular expression that triggers invalid write operations. Rated

CVE-2018-18312 CRITICAL POC
9.8 Dec 05

Perl before 5.26.3 and 5.28.0 before 5.28.1 has a buffer overflow via a crafted regular expression that triggers invalid

CVE-2026-13221 CRITICAL POC
9.1 Jul 13

Silently incorrect regular-expression matching in the Perl interpreter (all versions through 5.43.9) lets an oversized a

CVE-2018-18313 CRITICAL POC
9.1 Dec 07

Perl before 5.26.3 has a buffer over-read via a crafted regular expression that triggers disclosure of sensitive informa

CVE-2016-2381 HIGH
7.5 Apr 08

Perl might allow context-dependent attackers to bypass the taint protection mechanism in a child process via duplicate e

CVE-2023-31484 HIGH POC
8.1 Apr 29

CPAN.pm before 2.35 does not verify TLS certificates when downloading distributions over HTTPS. Rated high severity (CVS

CVE-2016-6185 HIGH POC
7.8 Aug 02

The XSLoader::load method in XSLoader in Perl does not properly locate .so files when called in a string eval, which mig

CVE-2018-12015 HIGH POC
7.5 Jun 07

In Perl through 5.26.2, the Archive::Tar module allows remote attackers to bypass a directory-traversal protection mecha

CVE-2020-10543 HIGH
8.2 Jun 05

Perl before 5.30.3 on 32-bit platforms allows a heap-based buffer overflow because nested regular expression quantifiers

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy