Php2shell - is BIGIP vulnerable?

Hello,

is BIGIP vulnerable to recent php2shell?

Is this iRule good to protect services?

when HTTP_REQUEST {
    if { [HTTP::method] eq "POST" && \
         [string tolower [HTTP::header "Content-Type"]] contains "multipart/form-data" } {

        set content_length 0
        if { [HTTP::header exists "Content-Length"] } {
            set content_length [HTTP::header "Content-Length"]
        }

        if { $content_length > 0 && $content_length <= 16384 } {
            HTTP::collect $content_length
        }
    }
}

when HTTP_REQUEST_DATA {
    if { [string match -nocase "*PHP_SESSION_UPLOAD_PROGRESS*" [HTTP::payload]] } {
        # Logujemy i blokujemy
        log local0. "PHP2Shell block: PHP_SESSION_UPLOAD_PROGRESS detected from [IP::client_addr]"
        HTTP::respond 403 content "Request blocked" noserver
        drop
    }

    HTTP::release
}

https://my.f5.com/manage/s/article/K000163821

It doesn’t look like the BigIP is vulnerable.

I don’t have any exploit data so I cannot tell if your irules will do the trick.

It doesn’t look like the BigIP is vulnerable.

They don’t know yet but they use php so it probably is:
rpm -q php
php-5.4.45-1.f5.8.0.41.14.i686

Bugger! I missed the fine print.

We will have to see what they turn up then.

Behind the bigip itself which can be somehow protected by not being exposed, I cannot find anything about asm mitigation for affected web servers.

Is there something?

A new WAF signature IM file “ASM-AttackSignatures_20261021_155738” has just been released and it contains, among others, an added signature

  • Added Server Side Code Injection signature 200204113 for PHP Remote Code Execution

Sounds good but not 100% sure.
I have a support case opened for hours now and I’m trying to get a confirmation from support that this one mitigates php2shell

Update after installing this WAF signatures file:
id 200204113 =>
Signature Type: Request

Signature Scope: Parameter/Cookie, XML, JSON, GWT, Plain Text

Attack Type: Server Side Code Injection

Systems: PHP

Risk: High

Accuracy: Medium

Last Updated: 2026-10-21

Reference:

CVE-2026-109619

Update 2:
newer file released with following 2 signatures

ASM-AttackSignatures_20261021_191526:

  • Added Command Execution signature 200103697 for PHP Remote Code Execution (2)
  • Added Server Side Code Injection signature 200204115 for PHP Remote Code Execution (3)

Updated K000163821:

  • TMOS v17.x and v21.x is officially affected. But just Config Utility (TMUI).
  • Mitigation relates to tuning ASM Policy for TMUI access (??).
  • It is not stated in F5 Security Advisory, but applying K13309 or even enforcing network ACLs in front of Config Utility seems to be a good Defense-in-Depth strategy until ENG hotfix is available^^

Cheers, Kai

Yet another Update to K000163821:

  • SIRT just added APM Module to the list. Cross you fingers that data plane via APM is not a attack vector.

Edit:

Yet another Update to K000163821:

  • SIRT added comprehensive mitigation instructions for TMUI, APM and SSLO.

Stay save and cheers, Kai

Well, in the mitigation instructions it says “The configuration mitigations recommended by PHP” while on php.net they posted “There are no complete mitigations, updating is the only safe choice.” Hopefully F5 is working on an update and will be releasing it soon…

Also Access profile is now listed as affected:

May I ask about mitigation procedure?

I understand that ini file will mitigate this php2shell directly but I don’t understand next paragraph.

Is this exploit really need hacker to authenticated BIG-IP before it can attack using php2shell?

If it need authenticated user, (I have only one admin account =me). So I can have a peace of my mind that hacker can’t use php2shell to attack my BIG-IP to some extent.

Hi @kridsana

Good question, it could be written a bit clearer.

I read it as this, if you have an authenticated user then there is no mitigation.

The mitigation works against unauthenticated requests which we really want!

I would really suggest editing or pinning this thread - BigIP is vulnerable. Specifically not only config but also the Data Plane / Access profile! So in many cases exposed to the internet. I hope people are not only referencing this thread and stop reading here thinking they are safe.

Please update as soon as a hotfix is released. If you can afford to, take the system offline if internet facing until fixed.

A bit late for the most, but my time yesterday was limited. I had to implement the mitigations on a few hundred of BIG-IPs… Since this can’t be done manually, I’ve written some scripts for Restsh.

Mitigation scripts:

Greetings

Jürgen

Thank you all. The DevCentral team is actively tracking this thread, and we have reached out to (very busy) internal experts for confirmation and guidance. Hoping to have some of your open questions addressed as soon as possible.

Back to note: Yep - our SIRT team is very busy. They confirmed for me that K000163821 is being updated as new information comes to light, is tested, and confirmed. That is the source of truth and includes several mitigations: look for Security Advisory Recommended Actions.

Further, “vulnerable” is constantly evolving and nuanced, so it won’t do me/you all any good to be hyper-specific here; anything I say will be stale as soon is it’s written. Instead, your best bet is to stay laser focused on known vulnerable versions in the BIG-IP and BIG-IP Next tables in the Security Advisory under the Versions Known to be vulnerable column.

on clarity

Our technical team tries to ensure that the article is clear, complete, and accurate. I’ve also alerted that team to some of your questions here in case that provides them opportunities for adjustments. Keep your good questions coming.

on staying up to date :f5-mvp:

@Kai_Wilke is doing yeoman’s work posting updates related to that article.
Thanks also to @Juergen_Mang for sharing his scripts.

Watch this post

LOGGED IN USERS: at the right of this post there is a bell icon you may click to Watch or Track this post.


After that - confirm your notification settings are enabled the way you prefer here:
https://community.f5.com/my/preferences/notifications

RSS Feed Option

There are instructions on My.F5.com for subscribing to RSS Feeds which may help some of you. K9957: Creating a custom RSS feed to view new and updated documents I tried it but the best I could do was subscribe to a list of things that include this 163821 post - I don’t know how to subscribe to ONLY that article (yet).

We have a fixed release now :slightly_smiling_face:

K000163848: What are the releases for the October 23 Critical Release

Hi Folks,

Yet another Update to K000163821 :

F5 has released updates for BIG-IP 17.5.1 and 17.1.3 that include updated PHP libraries. I strongly recommend upgrading your devices as soon as possible.

After the upgrade, I also strongly recommend reapplying the php.ini.d mitigation (APM/SSLO data-plane) and maintaining strict IP-based access restrictions for the TMUI administration interface (config-plane).

Data-Plane Mitigation (K000163821):

Config-Plane Mitigation (K000163821 / K13309):

The reason for the additional mitigation steps is precautionary: During the past week, several trillion AI tokens have been used by various actors to identify vulnerabilities in PHP. Therefore, I expect additional vulnerabilities and attack techniques to emerge over the coming weeks and months.

PHP Warns of Another Unpatched RCE Risk Two Days After Emergency PHP2Shell Patches
Elise: “still works on 8.5.12! edit: …” - katze.sh

Cheers and stay safe, Kai

New PHP related issue tracked in a new K-Article → K000163878

As I mentioned in my previous post. Patch your units and then (re)apply the mitigations outlined in K000163878. And dont forget to restrict access to your Management-IP… :wink:

Cheers and stay safe, Kai

It seems sensible to add the php mitigation as pre post-deployment task for new installations and updates.

Wiz still seems to be reporting our upgraded F5 units as vulnerable. We’ve already raised a support case with Wiz. Has anyone else experienced the same issue in their environment?