# CVE-2026-77682: epiphany: JavaScript code injection in autofill via unsanitized CSS selector from element id

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **CWE:** CWE-94
- **Published:** 2026-11-27T06:46:35.599Z
- **Modified:** 2026-11-27T07:17:03.603Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker can inject arbitrary JavaScript into Epiphany's autofill script world by hosting a malicious HTML form with a crafted id, triggered when the user selects an Autofill context menu item.

## Who should check

- Anyone running GNOME Epiphany \>= 47.0, \< 49.9; \>= 50.0, \< 50.6

## Description

A code injection vulnerability exists in Epiphany when the user invokes form autofill from the context menu on a page containing a malicious HTML form.

In embed/web-process-extension/resources/js/ephy\_autofill.js, getSelector() builds a CSS selector by directly interpolating an element's id attribute:

    path.unshift(\`\#${el.id}\`);

When the user selects an autofill entry, the browser process in embed/ephy-web-view.c previously constructed JavaScript using sprintf with the selector embedded in single quotes:

    EphyAutofill.fill(PAGE\_ID, 'SELECTOR', FILL\_CHOICE);

Because SELECTOR comes from attacker-controlled page content and is not escaped, a crafted id such as a'); PAYLOAD; var \_=(' breaks out of the string literal and executes arbitrary JavaScript when the script is evaluated.

The injected code runs in Epiphany's private autofill script world, which hosts EphyAutofill credential APIs and password manager save/request handlers. The reporter demonstrated a proof of concept that injects credentials into another domain and uses Ephy.permissionsManager to enumerate domains with special permissions. Full exfiltration of all saved passwords was not demonstrated but may be possible given the privileges of this context.

Exploitation requires the victim to visit a malicious page, right-click on a form field, and choose an Autofill context menu item. This is a deliberate user action but does not require installing software or entering credentials manually.

Affected versions: Epiphany \>= 47.beta.
Fixed upstream in epiphany 50.6 and 49.9 via merge request !2147, which replaces sprintf-based script evaluation with a WebKit user message and jsc\_value\_object\_invoke\_method() passing the selector as a typed string argument.
Upstream report: https://gitlab.gnome.org/GNOME/epiphany/-/issues/2921

## Affected and fixed versions

- GNOME Epiphany: \>= 47.0, \< 49.9; \>= 50.0, \< 50.6 (cvelist)

## Mitigation

- Upgrade Epiphany to 50.6 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-77682. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-77682.md
Affected: GNOME Epiphany >= 47.0, < 49.9; >= 50.0, < 50.6
Fixed in: GNOME Epiphany 49.9, GNOME Epiphany 50.6

Steps:
1. Search this machine and project for GNOME Epiphany: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-77682 being exploited?

There is no confirmed exploitation: CVE-2026-77682 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-77682?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-77682?

GNOME Epiphany \>= 47.0, \< 49.9; \>= 50.0, \< 50.6.

### Is there a fix for CVE-2026-77682?

Yes. Fixed in GNOME Epiphany 49.9, GNOME Epiphany 50.6. Upgrade Epiphany to 50.6 or later.

### How do I check if I'm affected by CVE-2026-77682?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://access.redhat.com/security/cve/CVE-2026-77682>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2520893>
- other: <https://gitlab.gnome.org/GNOME/epiphany/-/issues/2921>
- other: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/2147>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-77682>

HTML: <https://flawdb.com/CVE-2026-77682> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-77682>
