Fortinet's OSPF and BGP Daemon Flaws: What They Mean for Routing Trust

In my post on the 10 November advisories I listed the FortiOS routing bugs in a table and moved on. They deserve more than a row each. A routing daemon is the one part of a firewall that deliberately accepts input from other devices and acts on it, so a bug there is a question about who you trust on the wire.

This post covers the two FortiOS routing advisories: FG-IR-26-267 in the OSPF daemon and FG-IR-26-268 in the BGP daemon. I have read both on Fortinet’s PSIRT pages. I have not reproduced either bug and I am not going to describe how to.

What the advisories say

FG-IR-26-267, OSPF (CVE-2026-126253). The advisory title is “Authentication bypass by primary weakness” and the summary says the flaw may let an unauthenticated attacker broadcast an LSA using a specially crafted request. The CVSS 3.1 score is 9.3, with an adjacent-network vector, no privileges and no user interaction. The impact is listed as improper access control, and the vector marks integrity and availability as high.

FG-IR-26-268, BGP (CVE-2026-126254). A numeric truncation error (CWE-197) in the BGP daemon. The summary says a configured iBGP neighbour can send malformed route attributes to connected routers through a crafted request. The score is 9.6, with a network vector and low privileges required. The impact field says denial of service, and the attack type says authenticated.

Both affect FortiOS 8.0.0 to 8.0.1, 7.6.0 to 7.6.7, 7.4.0 to 7.4.12 and 7.2.0 to 7.2.13, and FortiSASE. Both are fixed in 8.0.2, 7.6.8, 7.4.13 and 7.2.14. Neither is listed as exploited. The OSPF advisory lists FortiOS 7.0 as affected with a migration as the answer, and the BGP advisory does not list 7.0 at all.

OSPF: the trust boundary is the segment

An OSPF router accepts link-state advertisements from anything it has an adjacency with, and in the usual design the only barrier to forming one is being on the same layer-2 segment, optionally with a shared key. The adjacent-network vector in the CVSS score says the same thing: the attacker needs to be on a segment where the FortiGate speaks OSPF.

What an injected LSA can do is covered in the LSA types post. A forged router or external LSA can add routes, change costs and pull traffic toward a device the attacker controls, without touching the destination. That is an integrity attack on your routing table, and the vector scores it that way.

The part I would not skip is the title. This is an authentication bypass in the OSPF daemon. The advisory page does not say whether configuring OSPF authentication changes exposure, and I could not find anything that does. My reading is that you should not count on a key-chain as the control here, because the bug is in the code that decides whether a packet is authentic. That is an inference, not something Fortinet states, and if Fortinet clarifies it I would take their wording over mine. Patch.

The segment still matters. Every interface where your FortiGate runs OSPF is a place this bug could be reached, so the interfaces list is the exposure list.

BGP: the trust boundary is the neighbour

BGP is configured neighbour by neighbour, so the attacker in the advisory is a configured iBGP peer. That sounds like a high bar, and it is lower than it looks. In an iBGP mesh or a route-reflector design, as the iBGP post and the route reflector post describe, every router in the AS trusts its iBGP peers to carry attributes faithfully. A compromised router inside the AS is the realistic attacker, not an outsider on the internet. The vector says network, low privileges, which fits that picture.

The wording that I cannot resolve is “send malformed attributes to connected routers”. It suggests the FortiGate may end up passing bad attributes on to its other peers, which would matter even if those peers are not Fortinet. The page does not say, and it lists the impact as denial of service. A numeric truncation error is a length or size value being squeezed into a smaller type, and attribute parsing is where that class of bug usually shows up. RFC 7606 was written because malformed attributes used to reset whole BGP sessions, and it moved implementations toward treating a bad update as a withdrawal instead. I do not know how FortiOS behaves here and the advisory does not say.

The BGP advisory also lists a virtual patch (FG-VD-62507.0day, in FMWP database update 26.118) as a mitigation. The OSPF advisory lists none. I would treat a virtual patch as something that buys time and upgrade anyway.

Side by side

OSPF, FG-IR-26-267BGP, FG-IR-26-268
CVSS 3.19.39.6
Attack vectorAdjacent networkNetwork
PrivilegesNoneLow, a configured iBGP neighbour
Trust boundaryThe layer-2 segmentThe BGP peering
Listed impactImproper access controlDenial of service
Mitigation besides patchingNone listedVirtual patch in FMWP update 26.118
Fixed in8.0.2, 7.6.8, 7.4.13, 7.2.148.0.2, 7.6.8, 7.4.13, 7.2.14

What to check on a FortiGate

Start with what runs, because the exposure depends on which interfaces speak the protocol and who is on the other end. These are read-only commands:

get system status
get router info ospf neighbor
get router info bgp summary
show router ospf
show router bgp

get system status gives the version to compare against the fixed builds. The two get router info commands show who your OSPF and BGP neighbours actually are, and any neighbour you do not recognise is a finding on its own. The two show commands list the configuration, including which networks and interfaces are in OSPF and which neighbours are configured in BGP.

The OSPF configuration has two places that decide where the daemon listens. config network maps prefixes to areas, and any interface whose address falls inside a range can run OSPF. set passive-interface takes a list of interface names that should not form adjacencies. FortiOS has no blanket default for that list, so you name the interfaces. If your network ranges are broad, an interface you never meant to expose may be speaking OSPF.

Where OSPF should run, authentication is configured on the area or on the interface. From the FortiOS 7.6 CLI reference, the interface form is:

config router ospf
    config ospf-interface
        edit "core-link"
            set interface "port2"
            set authentication message-digest
            config md5-keys
                edit 1
                    set key-string ExampleKeyOnly
                next
            end
        next
    end
end

The interface entry also has a keychain option for message-digest authentication, and the area has its own authentication setting. I am showing the MD5 form because it is the one I confirmed in the reference, and I checked the 7.6.1 reference, not 7.6.8. Authentication is still worth having, as it stops a casual rogue router from joining. It is just not the fix for this bug.

What I would do

  1. Find out which FortiGates run OSPF or BGP at all. A firewall that does neither is not exposed to these two.
  2. Upgrade those to 8.0.2, 7.6.8, 7.4.13 or 7.2.14. On 7.0, the OSPF advisory points to a migration.
  3. Where OSPF runs, list the interfaces and remove it from any that do not need it. Tighten the network ranges and use passive-interface for the rest.
  4. Where BGP runs, check every configured neighbour against what you expect. For an iBGP design, ask what a compromised router inside the AS could do.
  5. Read the advisory pages again after you patch. FG-IR-26-268 was updated on 13 November, three days after publication.

Sources: