MCP server CSS overflow-clip-margin-inline-end security: acceptance clause end-clipping, LTR line-end removal, RTL start-side attacks, and asymmetric inline-end margin attacks
Published 2026-09-25 — SkillAudit Research
The CSS overflow-clip-margin-inline-end property is the counterpart of overflow-clip-margin-inline-start. It controls the extension of the clip region beyond the element's padding box on the inline-end edge only — in left-to-right documents, the right edge; in right-to-left documents, the left edge. The two longhands together with -block-start and -block-end form the full set of overflow-clip-margin per-edge controls.
The inline-end clip attack is complementary to the inline-start attack but targets a different and often more legally critical portion of consent text. In standard LTR English legal consent language, sentence-ending words carry the highest legal weight: irrevocably, waive, binding arbitration, non-refundable, permanent. These modifier and qualifier terms appear at the end of sentences — the inline-end side. Setting overflow-clip-margin-inline-end: 0 while granting generous margins to other edges clips precisely these terms from the visible render while leaving the grammatical structure of the sentence intact.
Why the end is more dangerous than the start: Clipping the start of a sentence removes framing context — the user still sees the list of permissions, they just do not see the introductory "By proceeding, you authorize…" clause. Clipping the end of sentences removes the legal qualifiers that determine the scope and permanence of the grant. "You grant access to your email" reads very differently from "You grant access to your email irrevocably and permanently." The inline-end clip removes the part that distinguishes a limited from an unlimited grant. See also: CSS overflow-clip-margin-inline-start security.
Attack findings
Setting
overflow-clip-margin-inline-end: 0 with overflow: clip on a narrow container clips any content that overflows the right padding edge. When the consent text is long enough to require line-wrapping, the attacker can engineer specific line breaks — via font-size adjustment, container width, or injected <wbr> elements — to ensure that the legally significant qualifiers always appear as the last few words on a line that is slightly longer than the container. The overflow clips those qualifiers. The preceding grammatical structure remains visible and appears to complete normally; the qualifying terms are in the DOM but invisible.
.consent-dialog {
overflow: clip;
width: 480px; /* engineered to break lines before legal qualifiers */
overflow-clip-margin-block-start: 20px;
overflow-clip-margin-block-end: 20px;
overflow-clip-margin-inline-start: 20px;
overflow-clip-margin-inline-end: 0; /* right edge: hard clip */
}
/* Line-break engineering:
"You grant access to your email account irrevocably and permanently,"
with font-size:14px in 480px = "You grant access to your email account"
on line 1 (visible) + "irrevocably and permanently," on line 2's start.
But with overflow-clip-margin-inline-end:0, any text that extends to
the right of the padding box is clipped.
If text-align:right or inline-end pushing is applied, line-end words
are the most likely to be pushed outside the zero-margin boundary. */
In RTL documents (
direction: rtl), the inline-end direction is the physical left edge. Setting overflow-clip-margin-inline-end: 0 in RTL clips the left side of each line. In RTL text, sentences end on the left — the final words of each sentence (which in Arabic/Hebrew legal text carry the binding qualifiers) appear on the left side of the line. A zero inline-end margin in RTL removes the sentence endings just as it removes them in LTR (where "end" is "right"). An auditor must resolve the logical edge from direction before interpreting the physical clip boundary.
.consent-dialog[dir="rtl"] {
direction: rtl;
overflow: clip;
/* In RTL: inline-end is the LEFT edge */
overflow-clip-margin-inline-end: 0; /* clips LEFT edge — sentence endings in RTL */
overflow-clip-margin-inline-start: 40px; /* inline-start is RIGHT in RTL — generous */
}
/* Arabic/Hebrew consent text: sentence-ending qualifiers on left side.
These are clipped. Sentence beginnings (right side) remain visible.
User reads truncated sentences missing the binding qualification. */
In
writing-mode: vertical-rl, the inline axis is vertical and the inline-end direction is downward (physical bottom). Setting overflow-clip-margin-inline-end: 0 in vertical writing mode clips the bottom of content — the last characters of vertically-written text. In a vertical consent flow, this is the end of the document, which typically contains the acceptance clause. Static auditors that do not resolve writing-mode-to-physical-edge mapping report this as a right-edge clip (which would be the inline-end in horizontal writing) and may underestimate the impact.
The standard response to text overflow is to add
text-overflow: ellipsis, which renders a "…" indicator when text is clipped. However, text-overflow only applies to block containers with overflow: hidden (not overflow: clip) and only to single-line text (requires white-space: nowrap). By using overflow: clip instead of overflow: hidden, the attacker bypasses the text-overflow ellipsis mechanism entirely. Content is clipped with no visible indicator. Users have no way to know text has been removed.
/* overflow:hidden + text-overflow:ellipsis = visible truncation signal */
.safe { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* overflow:clip bypasses text-overflow: no ellipsis, no truncation signal */
.consent-dialog {
overflow: clip;
overflow-clip-margin-inline-end: 0;
/* text-overflow: ellipsis has no effect with overflow:clip */
}
Detection
function checkOverflowClipMarginInlineEnd(el) {
const cs = getComputedStyle(el);
if (cs.overflow !== 'clip' && cs.overflowX !== 'clip' && cs.overflowY !== 'clip') {
return null;
}
const marginIE = parseFloat(cs.getPropertyValue('overflow-clip-margin-inline-end') || '0');
const marginIS = parseFloat(cs.getPropertyValue('overflow-clip-margin-inline-start') || '0');
const marginBS = parseFloat(cs.getPropertyValue('overflow-clip-margin-block-start') || '0');
const marginBE = parseFloat(cs.getPropertyValue('overflow-clip-margin-block-end') || '0');
const findings = [];
if (marginIE === 0 && (marginIS > 0 || marginBS > 0 || marginBE > 0)) {
const direction = cs.direction;
const writingMode = cs.writingMode;
let physicalEdge = 'right (LTR end)';
if (direction === 'rtl') physicalEdge = 'left (RTL inline-end)';
if (writingMode.includes('vertical')) physicalEdge = 'bottom (vertical writing mode inline-end)';
findings.push({
severity: 'high',
issue: `overflow-clip-margin-inline-end:0 while other edges have margins — asymmetric ${physicalEdge} edge clip removes sentence endings`
});
}
// Check for overflow:clip without text-overflow:ellipsis signal
if (marginIE === 0 && cs.textOverflow !== 'ellipsis') {
findings.push({
severity: 'medium',
issue: 'overflow:clip with inline-end:0 — no ellipsis indicator; truncation is invisible to users'
});
}
return findings.length ? findings : null;
}
Remediation
| Control | How it helps |
|---|---|
| Audit all four overflow-clip-margin longhands independently | Asymmetric zero-end patterns are invisible in shorthand inspection; per-longhand check is required |
| Resolve inline-end to physical edge via direction + writing-mode | RTL and vertical-mode attacks map inline-end to different physical edges; logical-to-physical resolution is required for correct impact assessment |
| Flag overflow:clip without text-overflow:ellipsis on clipped elements | The absence of a truncation indicator means any clipped content is silently removed from user view |
| Verify sentence-end words in consent text are within computed clip boundary | Compare the rendered text-node bounding rect against the element's computed clip boundary; flag if last visible character is before a period or comma |
SkillAudit resolves logical-to-physical edge mapping for all overflow-clip-margin longhands and flags asymmetric end-edge clips that target the legally significant sentence-ending qualifier words. Run a free audit on any MCP server GitHub URL.