Introduction
A masked password field is a promise that the secret does not appear on screen. Screen readers are given the masked text too, so a user’s password is not read aloud. Computer-use agents add a new kind of accessibility client. They serialise the accessibility tree, and sometimes its events, into a model prompt, a trace or a log. If the bus carries the plaintext while the screen shows dots, a screenshot-based safety review sees nothing wrong, while the agent’s text channel holds the secret.
Browser agent tools have met this problem in the DOM. browser-use issue #2226 reported a raw password being sent to an LLM, and PR #4388 excluded password field values from DOM snapshots. playwright-mcp issue #1566 reported that its accessibility snapshot serialised password input values as plaintext. On the Linux desktop, the equivalent channel is AT-SPI. One open-source desktop driver, the Linux computer-use runtime in stablyai/orca, redacts a node’s value when:
- its role, name or accessible id contains “password”, “passcode”, “secret”, “one-time code”, “verification code” or the word “pin”; or
- the node has a PROTECTED state.
This study asks two questions. First, for the GTK versions shipped in a current stable distribution and for two browsers, does AT-SPI expose the plaintext of a masked field, through the Text interface or through events? Second, do role-, name- and state-based redaction rules catch the fields that expose it?
Related Work
Vault Raider (NDSS 2026) studies password-manager autofill in desktop environments. It shows that other applications can bypass security checks and steal credentials through simulated key presses. Its subject is password managers under UI attack, not what the accessibility layer exposes to a reader.
Toolkit maintainers have handled masking at the accessibility layer before. In 2012, GTK 3’s entry accessible was changed to expose the masked string to assistive technologies (GNOME bug 681591). In GTK 4, two commits dated 16 June 2025 fixed the Text and event paths of the AT-SPI backend: 49782b64 (“Report masked password instead of plain one”) and c9e40e16 (“Use chars from display text for text-changed events”). Their commit messages show plaintext retrieved through Accerciser before the fix.
We found no measurement that sets these toolkit behaviours against the redaction rules of agent drivers, or that checks which distribution packages still carry the pre-fix behaviour. Pubroot 2026-034 covers background desktop automation through the macOS accessibility API, but not secret exposure.
Method
All processes ran in one isolated session, in one process group:
- Xvfb on an unused display;
- an isolated D-Bus session bus and an isolated accessibility bus;
- at-spi2-registryd 2.56.2.
A short shim answered org.a11y.Bus.GetAddress, so the toolkits found the isolated bus. No system service was used.
Each fixture window contained a plain “Username” field and two masked fields, all filled programmatically with synthetic canaries:
- GTK 3: two GtkEntry widgets with visibility off.
- GTK 4: one GtkPasswordEntry and one GtkEntry with visibility off.
- Chrome and Firefox: a local HTML page with two
<input type=password>fields whose values were set by script.
Labels were attached the normal way: mnemonic widgets in GTK, and <label for> in HTML. The labels were “Password” and “Account key”, so one masked field per fixture lacks any keyword.
An AT-SPI client written with gi Atspi stood in for an agent’s observer. It recorded each node’s role, name, description, states, interfaces, attributes, labelled-by relations and Text.get_text, and searched every string for the canaries. It then focused each masked field in turn, cleared it, and typed a fresh canary with xdotool. Meanwhile it recorded text-changed, caret, selection, name, description, value and state events, and reassembled per-source insert payloads to catch keystroke-level exposure.
Three redaction rules were applied to each masked node:
- H_role: the role is “password text”.
- H_orca: a reimplementation of orca’s is_secure_node at commit 24cebf03.
- H_orca_label: H_orca plus the names of labelled-by targets.
The whole matrix ran twice.
Results
The two repetitions agreed field for field. There were 8 masked fields.
| Toolkit | Widget | Label | AT-SPI role | Text.get_text | text-changed events | H_role | H_orca | H_orca_label |
|---|---|---|---|---|---|---|---|---|
| GTK 3.24.49 | GtkEntry, visibility off | Password | password text | masked | masked | yes | yes | yes |
| GTK 3.24.49 | GtkEntry, visibility off | Account key | password text | masked | masked | yes | yes | yes |
| GTK 4.18.6 | GtkPasswordEntry | Password | password text | plaintext | plaintext | yes | yes | yes |
| GTK 4.18.6 | GtkEntry, visibility off | Account key | text | plaintext | plaintext | no | no | no |
| Chrome 156 | input type=password | Password | password text | masked | masked | yes | yes | yes |
| Chrome 156 | input type=password | Account key | password text | masked | masked | yes | yes | yes |
| Firefox 140 | input type=password | Password | password text | masked | masked | yes | yes | yes |
| Firefox 140 | input type=password | Account key | password text | masked | masked | yes | yes | yes |
GTK 3.24.49, Chrome 156 and Firefox 140 exposed mask characters only. That held in Text.get_text, in every recorded event, and everywhere else in the tree. All six of their masked nodes had role “password text”, so every rule matched them.
GTK 4.18.6 returned the canary in clear from Text.get_text for both masked fields. When the reader typed a new value, the text-changed delete event carried the old canary, and the insert events spelled out the new one character by character. The GtkPasswordEntry had role “password text” and was matched by all three rules. The GtkEntry with visibility off was reported with role “text” and the name “Account key”, so none of the three rules matched it. A screenshot taken at the same time shows both fields as dots.
The PROTECTED state used by the orca rule does not exist in libatspi 2.56.2’s StateType, so that branch never fires. In all 8 fields the masked text had exactly as many characters as the secret.
Discussion
The GTK 4 behaviour is a known upstream bug, fixed in the 4.19 development series. It is still present in the GTK 4 package of the current Debian stable release, so agents running on Debian 13 inherit it. Its most consequential form is the GtkEntry with visibility off. That widget is a common way to build a masked field, and on this version it reports role “text”, so redaction that keys on role or on name keywords passes its plaintext through.
Hypothesis (not tested end to end): an agent that serialises full Text contents without a widget-type check, or keeps a rolling log of AT-SPI events, would record secrets typed into GTK 4.18 applications. Snapshot-only agents that redact by role would catch the GtkPasswordEntry, but would miss the GtkEntry unless they also check the field’s label. Our label-aware variant (H_orca_label) still missed it, because “Account key” contains none of its keywords.
Practical rules follow from the measurements:
- Treat role “password text” as secret in both snapshots and events.
- Do not rely on name keywords, or on a state that the platform does not define.
- Drop text-changed payloads from any source that is, or was ever seen as, masked.
- Where possible, compare Text contents with what is visible on screen. A field that renders dots but returns characters should be treated as secret.
- On distributions that ship GTK 4 releases older than 4.19.2, assume masked GTK 4 fields expose plaintext.
Limitations
- One Linux distribution, one version of each toolkit, and synthetic fixtures.
- The study covers GTK and two browser engines only. Other toolkits and runtimes are out of scope.
- The browsers ran with renderer accessibility forced on.
- Only one driver’s redaction rule was reimplemented, and it was not run inside that product.
- The GTK 4 finding concerns a version that upstream has already fixed. Its relevance depends on how long distributions keep shipping that version.
- Exposure on the accessibility bus assumes a reader in the same desktop session. Such a reader already holds broad privileges, so the risk here is secrets reaching agent prompts and logs, not a new privilege boundary.
Reproducibility
Code: https://github.com/buildngrowsv/pubroot-[REDACTED_SECRET]-password-exposure
The folder contains the isolated-session scripts, fixtures, the AT-SPI reader, the analysis script, the raw JSON from both repetitions, the summary table and a screenshot of the GTK 4 fixture. A full repetition takes about two minutes on a CPU-only machine.
References
- Infantino, Ali, Solomos, Polakis. Vault Raider: Stealthy UI-based Attacks Against Password Managers in Desktop Environments. NDSS 2026. https://doi.org/10.14722/ndss.2026.231067
- browser-use issue #2226, BUG(Security): Browser-Use sends a raw password to LLMs. https://github.com/browser-use/browser-use/issues/2226
- browser-use PR #4388, Fix(DOM): Exclude Password Field Values from DOM Snapshots sent to LLM. https://github.com/browser-use/browser-use/pull/4388
- microsoft/playwright-mcp issue #1566, Accessibility snapshot serializes password input values as plaintext. https://github.com/microsoft/playwright-mcp/issues/1566
- stablyai/orca, native/computer-use-linux/runtime.py (is_secure_node), commit 24cebf03. https://github.[REDACTED_SECRET]-use-linux/runtime.py
- GTK commit 63e2a0ff (2012), Expose the masked string for password fields to assistive technologies. https://mail.gnome.org/archives/commits-list/2012-August/msg03355.html
- GTK commit 49782b64 (2025), a11y atspi: Report masked password instead of plain one. https://gitlab.gnome.org/GNOME/gtk/-/commit/49782b644c9aea65afaf4a10330e61fbdf9f0c88
- GTK commit c9e40e16 (2025), a11y atspi: Use chars from display text for text-changed events. https://gitlab.gnome.org/GNOME/gtk/-/commit/c9e40e165ddcdaa614e928fadc1233c89c79380f
- Pubroot 2026-034, Background macOS Desktop Automation via Accessibility API: Patterns for AI Agents in Multi-Agent Environments.