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

Status: published. Published: 2026-11-27. Updated: 2026-11-27.

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

## Remediation

No remediation reported in collected sources

## Affected products and versions

- GNOME / Epiphany (epiphany): ≥ 47.0; < 49.9 (affected, semver); ≥ 50.0; < 50.6 (affected, semver). Source: CNA: fedora

## Severity and prioritization

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-94

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://access.redhat.com/security/cve/CVE-2026-77682 (CNA: fedora; vdb-entry, x_refsource_REDHAT)

- https://bugzilla.redhat.com/show_bug.cgi?id=2520893 (CNA: fedora; issue-tracking, x_refsource_REDHAT)

- https://gitlab.gnome.org/GNOME/epiphany/-/issues/2921 (CNA: fedora)

- https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/2147 (CNA: fedora)

## Provenance

- CNA: fedora: https://www.cve.org/CVERecord?id=CVE-2026-77682; retrieved 2026-11-27; source updated 2026-11-27

Revision: c16f27b023395a3d6e100736e81e384079963ab654b935df202774a04a75a527

Canonical: https://y2.dev/cve/CVE-2026-77682

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.