Skip to content

Pre-auth SQL Injection to RCE in Fortinet FortiWeb Fabric Co... #1100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

carlospolop
Copy link
Collaborator

🤖 Automated Content Update

This PR was automatically generated by the HackTricks News Bot based on a technical blog post.

📝 Source Information

🎯 Content Summary

FortiWeb Fabric Connector SQL Injection and Pre-Auth RCE (CVE-2025-25257)

Overview

Fortinet’s FortiWeb Fabric Connector integrates FortiWeb with other Fortinet products via HTTP handlers such as /api/fabric/device/status, /api/fabric/authenticate and /api/vX/fabric/widget.

Affected Versions and Fixes

  • FortiWeb versions 7.0.0–7.0.10, 7.2.0–7.2.10, 7.4....

    🔧 Technical Details

    A SQL injection arises in get_fabric_user_by_token because unvalidated token input is embedded into a MySQL query via snprintf, permitting arbitrary SQL execution.


    MySQL comment tokens (/**/) bypass the space-based filtering of __isoc23_sscanf, enabling injection of sleep() and boolean (OR '1'='1') payloads without spaces.


    The INTO OUTFILE statement provides an arbitrary file-write...

    🤖 Agent Actions

    Added advanced MySQL SQL-Injection → RCE techniques from watchTowr FortiWeb research:

    1. src/network-services-pentesting/pentesting-mysql.md
      • Expanded “MySQL File RCE” with detailed INTO OUTFILE-to-Python .pth exploitation, filters/limits bypass and practical payloads.
      • Added “## References” section including the blog URL.

    2. src/pentesting-web/sql-injection/mysql-injection/README.md
      • Inserted new “Injection without SPACES (/**/ comment trick)” subsection under WAF bypass, explaining comment-based space bypass used in FortiWeb.
      • Updated “Other MySQL injection guides” bullet and refreshed “## References” with both the classic cheatsheet and the new blog article.

    These updates integrate the novel techniques (space-less comment injections and INTO OUTFILE → .pth R...

    ✅ Review Checklist

    • Content is technically accurate
    • Formatting follows HackTricks style guidelines
    • Links and references are working
    • Content adds educational value
    • No sensitive information is exposed

    This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.

    📚 Repository Maintenance

    • MD files processed: 848
    • MD files fixed: 4

    All .md files have been checked for proper formatting (headers, includes, etc.).

@carlospolop
Copy link
Collaborator Author

🔗 Additional Context

Original Blog Post: https://labs.watchtowr.com/pre-auth-sql-injection-to-rce-fortinet-fortiweb-fabric-connector-cve-2025-25257/

Content Categories: Based on the analysis, this content was categorized under "generic-hacking/sql-injection-to-rce".

Repository Maintenance:

  • MD Files Formatting: 848 files processed (4 files fixed)

Review Notes:

  • This content was automatically processed and may require human review for accuracy
  • Check that the placement within the repository structure is appropriate
  • Verify that all technical details are correct and up-to-date
  • All .md files have been checked for proper formatting (headers, includes, etc.)

Bot Version: HackTricks News Bot v1.0

@carlospolop carlospolop merged commit 34e6ef7 into master Jul 14, 2025
@carlospolop carlospolop deleted the update_Pre-auth_SQL_Injection_to_RCE_in_Fortinet_FortiWeb_20250711_182725 branch July 14, 2025 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant