PHP allow_url_fopen is enabled

Published on 02 Jul 2018
Vulnerability

llow_url_fopen is used to retrieve data from remote servers and websites. There are servers with allow_url_fopen as enabled. The allow_url_fopen carries a risk of:-

  • Enabling Remote File Execution

  • Access Control Bypass

  • Information Disclosure Attacks

If an attacker can inject a remote URI into the file function. The function could manipulate an application into:-

  • executing the fetched file

  • storing the fetched file

  • displaying the fetched file

The function will perform the above operations in untrusted sources too.

Impact

Using this vulnerability, an attacker can:-

  • perform manipulation of sensitive information

  • leak sensitive information

  • gain administrator access to the web application

Mitigation / Precaution

Beagle recommends the following fixes:-

  • Disable allow_url_fopen in php.ini or .htaccess.
Febna V M
Written by
Cyber Security Engineer

Febna once spent an entire evening arguing with an AI chatbot just to prove that machines can be confidently wrong. The debate ended with no clear winner, but it did spark her curiosity for the fascinating world of artificial intelligence. Today, she works at the intersection of AI and cybersecurity, helping build smarter systems while making sure they don’t become too smart for their own good. When she’s not exploring the future of technology, she’s probably asking “but what if?” one more time.

Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 14 days
4.8 on G2 • ISO 27001 certified
See How Beagle Security Works
No credit card • No setup required
Launch interactive demo