The First and Most Fundamental Flaw: CVE-2026-49943

Site Admin · 3 Dec 2026 · Routing & Protocols

A long AS_PATH from a peer, a mask in the filter, and a fixed stack buffer. CWE-121, CVSS 6.3, affected 0–2.19.0, no fixed version. The supplier says operators should reject long attributes; the default does not.

A fixed stack array of 2048 + 1 positions. A peer-controlled AS_PATH that
can exceed it. A filter mask that makes the matcher walk the path. No fixed
version, and a supplier position that says this is the operator's problem.

What the advisory says

CZ.NIC BIRD Internet Routing Daemon through 2.19.0 contains a
stack-based buffer overflow in the BGP AS_PATH mask matching
implementation in nest/a-path.c. The as_path_match() function uses a
fixed-size stack array of 2048 + 1 pm_pos entries, while parse_path()
expands AS_PATH segments from a received BGP UPDATE without enforcing a
corresponding capacity limit. When RFC 8654 BGP Extended Messages are
enabled and a BIRD filter evaluates an AS path mask expression such as
bgp_path ~ [= ... =], an established BGP peer can send a long AS_PATH
containing more than 2048 expanded ASNs. This causes
parse_path()/as_path_match() to write beyond the fixed stack buffer,
resulting in a crash of the daemon.

CVE-2026-49943, GHSA-64c8-8qx9-25r7. Weakness CWE-121 (stack-based
buffer overflow). CVSS 3.1 6.3 MEDIUM:
AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:N/A:H. Affected 0–2.19.0. No fixed
version listed. NVD published 2026-06-02, last modified 2026-07-22.

The mechanism, step by step

  1. A peer has an established BGP session — at an exchange, membership is the
    only requirement.
  2. The peer sends a long AS_PATH. With RFC 8654 extended messages the UPDATE
    can be far larger than the historical 4096-byte cap, so more than 2048
    expanded ASNs are deliverable.
  3. A BIRD filter evaluates an AS path mask against the route. The mask makes
    the matcher align the pattern with the path.
  4. parse_path() produces more positions than as_path_match() can store.
  5. as_path_match() writes past the end of the pm_pos stack array.
  6. The stack canary aborts the process — or, with an info leak and a capable
    attacker, control flow is redirected.

The first outcome is a remote denial of service from any peer. The second is
code execution as the routing daemon.

Why it is the fundamental flaw

Every edge in part 6 is a condition. This one is the contract:

A route server's job is to accept BGP from hundreds of organisations and apply
policy to what they send. The policy language is the product. The matcher is
where the product touches the most hostile input in the system.

The supplier position

The advisory records the vendor's position plainly: a fix is not being
prioritised because all network operators should already be rejecting routes
with unusually long attributes.

That is a defensible position about operational hygiene. It is not a fix. An
operator who has not written a path-length limit is exposed, and the default
configuration does not write one for them.

What is documented, and what is inferred

Documented: CVE and GHSA identifiers, CWE-121, CVSS 6.3, the affected range
0–2.19.0, the absence of a fixed version, the file and functions
(nest/a-path.c, parse_path(), as_path_match()), the fixed array size
(2048 + 1 pm_pos entries), the role of RFC 8654 extended messages, and the
supplier position.

Inferred: the stack-smashing consequences (canary abort vs control-flow
hijack), and the exact composition of mask and path that exceeds 2048
positions. The advisory describes the producer/consumer gap; it does not
publish the arithmetic.

Unknown: whether a proof of concept exists, whether a distribution shipped
a backport on a pre-2.19 branch, and whether 2.20.0 contains an unannounced
fix. None of those should be assumed.

Next: Part 8 — no fix, no milestone: the version story and what to check
before assuming you are patched.