Skip to content
SQL injection Write-up Advanced

(CVE-2025–52970) Authentication Bypass in FortiWeb ”POC”

The FortiWeb appliance's API endpoint for device status passes the Authorization header token directly into a SQL query without validation, allowing an unauthenticated attacker to inject SQL. The report claims this can be escalated to remote code execution by writing a shell to the filesystem using MySQL's INTO OUTFILE.

medium.com

Published on medium.com

FortiWeb defends web applications and APIs against OWASP Top-10 threats, sophisticated bots, and denial-of-service attacks. FortiWeb features anomaly detection, API discovery and protection, bot mitigation, and advanced threat analytics.

HariHaranK, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The Authorization header token is concatenated directly into a SQL query without validation or parameterisation.

Impact

An unauthenticated attacker could bypass authentication and potentially achieve remote code execution on the FortiWeb appliance.

What the attacker needed

Network access to the FortiWeb management interface; no authentication required

How it was found

  1. Send a request to the device status API endpoint with a crafted Authorization header containing SQL injection.
  2. Use MySQL's INTO OUTFILE statement to write a file to the filesystem.
  3. Upload a shell to the server and interact with it via curl commands.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A web firewall product has an API endpoint that checks a login token by looking it up in a database. The token is inserted into the database query without cleaning it first, so an attacker can send a specially crafted token that changes the query. This lets them run database commands and, according to the report, write a file to the server to gain remote control.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.