PHP cURL Security Bypass

Published on
02 Jul 2018
1 min read

Curl is a command line tool and library for transferring data using URL. Curl supports almost all protocols like HTTP, HTTPs, FTP, FTPs, IMAP, IMAPS etc. CURL comes under free and open source software. The latest stable version of curl is 7.60.0. This was released on 16th May 2018.

There are many servers having Unfiltered curl file support. As curl supports any protocol, there are chances for many attacks like:-

file inclusion Command Injection etc.


The below code is a form.

        <form method="POST" action="beagletest.cgi">
        <input type=text name="Name">
        <input type=submit name=press value="OK">


The form can be submitted through curl as follows.

        curl --data "Name=sashwat&press=%20OK%20"


Using this format, an attacker can use curl to interact with server.


Using this vulnerability, an attacker can:-

  • 1manipulate sensitive information
  • leak sensitive information
  • gain administrator access to the web application

Mitigation / Precaution

Beagle recommends the following:-

  • Create a whitelist of accepted URLs.
  • Deny the usage of file:// protocol.
Automated human-like penetration testing for your web apps & APIs
Teams using Beagle Security are set up in minutes, embrace release-based CI/CD security testing and save up to 65% with timely remediation of vulnerabilities. Sign up for a free account to see what it can do for you.

Written by
Co-founder, Director
Find website security issues in a flash
Improve your website's security posture with proactive vulnerability detection.
Free website security assessment