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

- Severity: High 7.1 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.48%, higher than 42% of CVEs (2026-12-01)
- Published: 2026-11-27T06:46:35.599Z
- Modified: 2026-11-30T16:17:47.713Z
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: fedora

## 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

(As written by CVE List.)

## Affected

- epiphany: from 47.0 before 49.9; from 50.0 before 50.6

## References

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

## Sources

- CVE List: [CVE-2026-77682](https://www.cve.org/CVERecord?id=CVE-2026-77682), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-77682](https://nvd.nist.gov/vuln/detail/CVE-2026-77682), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-77682 · Whole record: https://cve.day/CVE-2026-77682.json · Rebuilt by cve.day 2026-11-30T16:32:19.379Z
