---
id: "CVE-2026-125400"
page: "https://infrastack.ai/live/CVE-2026-125400"
kind: "vulnerability"
aliases: ["CVE-2026-125400"]
title: "Ettercap: use-after-free in filter code lets network attackers run code as root"
severity: "high"
cvss: 8.8
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "ettercap", "fixed": [], "affected": "<= 0.8.4.1", "ecosystem": "vendor"}]
ecosystems: []
tags: ["ettercap", "linux", "network-security", "package", "pcre2", "root"]
not_affected_if: ["no-ettercap-installed", "no-filters", "no-pcre-regex-filter", "not-on-attacker-network", "pcre1-build", "unoffensive-mode"]
published_at: "2026-11-10T00:17:14+00:00"
first_seen_at: "2026-11-10T00:28:44+00:00"
updated_at: "2026-11-10T00:30:06+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125400", "first_seen_at": "2026-11-10T00:28:44+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-11-10T00:30:06+00:00"}]
exploit_sources: []
---

# Ettercap: use-after-free in filter code lets network attackers run code as root

Link for people: https://infrastack.ai/live/CVE-2026-125400 (this .md is for agents)

Ettercap through 0.8.4.1 reads freed PCRE2 match data in its filter code (func_pcre in src/ec_filter.c) when a loaded pcre_regex() substitution filter matches packets. A network-adjacent attacker can send matching packets to corrupt memory and potentially execute code as root.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:ettercap affected <= 0.8.4.1 fixed no fixed version listed

## How to check

- Run `ettercap --version`; 0.8.4.1 and earlier are affected, and no release has the fix yet.
- Exposed only if Ettercap is built with PCRE2 (the default on current distributions), is not run in unoffensive mode, and loads a compiled filter (.ef) whose source uses pcre_regex() with a replacement string. Check your filter sources (.filter files) for pcre_regex( with two arguments.
- Builds using the old pcre1 path are not affected.

## Fix

No released version yet (advisory: patched versions none). Fix is merged to master in commit 1d8badb713579419a29a494bb463a1af59707e98 (PR #1330); build from master after that commit, or stop loading pcre_regex() substitution filters until a release.

## Timeline

- 2026-11-10T00:28:44+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-125400
- 2026-11-10T00:30:06+00:00 analyst — Read GHSA-f3j5-rhhr-85j5 and merge commit 1d8badb (PR #1330). Advisory lists patched versions: None; fix merged to master 2026-11-06, no release yet. Requires pcre_regex() substitution filter, PCRE2 build, not unoffensive mode. No exploitation or PoC reported.

## Documents

- [advisory] Vendor advisory: github.com https://github.com/Ettercap/ettercap/security/advisories/GHSA-f3j5-rhhr-85j5
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ettercap-through-0.8.4.1-use-after-free-via-pcre2-filter-substitution
- [fix] Patch: github.com https://github.com/Ettercap/ettercap/commit/1d8badb713579419a29a494bb463a1af59707e98

## From the sources

Ettercap through 0.8.4.1 contains a use-after-free vulnerability in func_pcre() in src/ec_filter.c that reads the PCRE2 ovector after freeing match data. Network-adjacent attackers can send packets matching a loaded pcre_regex() substitution filter to corrupt memory and potentially execute code as root.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
