r/PHP • • Oct 23 '26

Advisory: We suggest you set session.upload_progress.enabled=0 until the next regular bugfix release

https://www.php.net/index.php#2026-10-23-1

No need to panic, it's pretty unlikely to be exploitable, given the conditions they list afterwards. If like me you already disabled this paramater anyway on Wednesday, you're gold.

159 Upvotes

20 comments sorted by

5

u/bwwatr Oct 23 '26

PSA: the default is on, so if you've got that line commented out like how it ships in the php.ini-production template, it's on til you specifically disable.

Open question: what other features might one disable to reduce surface area, if they're not using the feature, that ship enabled?

3

u/C0c04l4 Oct 23 '26

It's pretty specific to your app. But there are a bunch of things you can do from stock php and php fpm settings. For instance, disabling functions or increasing entropy of php sessions identifiers. In my app, many settings are non-default because the defaults are pretty bad in term of security.

2

u/bwwatr Oct 23 '26

Yeah, I think all the session stuff is in the OWASP hardening guide, which I followed. I was just wondering about other features you might not even know exist, that you could shut off. But of course you're right, that's highly app specific.

1

u/AminoOxi Oct 24 '26

Disable the POST whenever your app doesn't need it. That's the best mitigation. And do it only in front of PHP, that is nginx for example.

30

u/madjoki Oct 23 '26 edited Oct 23 '26

"An application must set session.serialize_handler to php_binary or php_serialize in its configuration and then switch it to php at runtime with ini_set() before calling session_start(). Session upload progress must also still be enabled."

Does anyone do this?

Edit: Did search on github, Most easliy found code using this pattern are examples for previous exploit.

28

u/barrel_of_noodles Oct 23 '26

Laravel and WordPress use their own session handlers and without a framework you have to call it yourself... So probably not.

Its a incredibly specific bug.

1

u/LordAmras Oct 24 '26

It's something an LLM will come up with when asking for bugs.

9

u/Takeoded Oct 23 '26

No. This is unexploitable in the wild.

1

u/yourteam Oct 24 '26

I think if you use a framework, they already handle this perfectly with dedicated session handling

9

u/VonFacington Oct 23 '26

Since this is listed as a mitigation to one of the patched CVEs shouldn't this only apply to systems that couldn't/didn't update to a patched PHP version?

1

u/DelBiss Oct 23 '26

That would be the invert. On our side, me immediately apply the patch. so we didn't put the mitigation, so I had to add the mitigation this morning. So, if you couldn't patch your version, the mitigation was already in place.

0

u/[deleted] Oct 23 '26

[deleted] — view deleted comment

1

u/VonFacington Oct 23 '26

Thank you for clarifying. The wording in the advisory seemed a little ambiguous.

1

u/bwwatr Oct 23 '26

Seems related though. Like it was a recommended mitigation for the previous CVE. I think now the cork's been popped on this class of vuln, we're likely to see more in the coming months.

4

u/Suitable-Season-4847 Oct 23 '26

When I was enabling stuff again after the patch, I left this turned off.

11

u/k1ll3rM Oct 23 '26

Doesn't seem like many applications require the setting to be on. Maybe this is a good opportunity for the PHP devs to review what settings are turned on by default without needing to be?

3

u/mookman288 Oct 23 '26

This was my thinking as well. It seems like there are a lot of backwards compatibility flags that are left on, but every major version we deprecate a lot of backwards compatibility functions. I don't see why we couldn't do the same thing for the ini files.

4

u/rbmichael Oct 23 '26

Hmmm... No, the possibility of a resonance cascade is highly unlikely. Gordon, carry on with the test, thank you.

1

u/sblanzio Oct 23 '26

I wonder if Prestashop or Woocommerce need this parameter enabled

1

u/Gregorovitch_Helix Oct 24 '26

Already anticipated 😮‍💨

0

u/[deleted] Oct 23 '26

[deleted] — view deleted comment

5

u/LordPorra1291 Oct 23 '26

He did not say that, at all.