LiveActive security incident?Get immediate response
CVE Record

CVE-2018-19787: An issue was discovered in lxml before 4.2.5.

An issue was discovered in lxml before 4.2.5. lxml/html/clean.py in the lxml.html.clean module does not remove javascript: URLs that use escaping, allowing a remote attacker to conduct XSS attacks, as demonstrated by "j a v a s c r i p t:" in Internet Explorer. This is a similar issue to CVE-2014-3146.

MediumCVSS 6.1Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

Older lxml versions could miss malicious links when cleaning HTML. If a service accepts untrusted HTML, sanitizes it with lxml.html.clean, and shows it to users, an attacker could still cause browser-side script execution. This is mainly a web application trust and content-safety issue, not a server takeover issue.

Executive priority

Treat as a moderate-priority remediation for internet-facing or customer-content web applications. Prioritize systems that display sanitized user HTML, collaboration content, profile fields, comments, or imported documents.

Technical view

CVE-2018-19787 affects lxml before 4.2.5 in lxml/html/clean.py. The cleaner failed to remove escaped javascript: URL schemes, enabling cross-site scripting when sanitized HTML is rendered. The CVSS 3.1 score is 6.1, with network attack vector, low complexity, no privileges required, and user interaction required.

Likely exposure

Exposure is most likely in Python applications that use lxml.html.clean to sanitize untrusted or user-supplied HTML before rendering it in browsers. Systems only parsing trusted XML or HTML without using the cleaner are less likely to be affected based on the supplied evidence.

Exploitation context

The source bundle does not show CISA KEV listing or cited active exploitation. Exploitation requires attacker-controlled HTML, affected sanitization behavior, and a user or browser rendering the resulting content. Impact is confidentiality and integrity loss through XSS in the application's browser context.

Researcher notes

Affected metadata in the bundle is sparse, but the description clearly names lxml before 4.2.5 and the vulnerable module. Validate actual exposure by confirming use of lxml.html.clean, not just package presence. The issue is similar to CVE-2014-3146 per the CVE description.

Mitigation direction

  • Upgrade lxml to 4.2.5 or a vendor-supported fixed package.
  • Apply relevant Ubuntu or Debian security updates where those distributions manage lxml.
  • Review vendor guidance for supported backported fixes in older operating system releases.
  • Add defense-in-depth output encoding and content security controls for rendered user HTML.

Validation and detection

  • Inventory applications and containers for lxml versions before 4.2.5.
  • Identify code paths using lxml.html.clean on untrusted HTML.
  • Confirm distribution package versions include the referenced security update or backport.
  • Add regression tests ensuring escaped script URL schemes are removed during sanitization.
Prepared
Confidence
high
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-79: User-session and phishing behavior lookup

Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2018-19787 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.1 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
6Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.1CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N2.82.7Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.1Medium
CVSS 3.1 vector shape for CVE-2018-19787Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/an/an/aListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-79 · source CWE mapping

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.