Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6] Dont serialize csrf cookie / header #25121

Merged
merged 1 commit into from
Aug 7, 2018
Merged

Conversation

taylorotwell
Copy link
Member

No description provided.

@taylorotwell taylorotwell merged commit c0eb907 into 5.6 Aug 7, 2018
@GrahamCampbell GrahamCampbell changed the title Dont serialize csrf cookie / header [5.6] Dont serialize csrf cookie / header Aug 7, 2018
@taylorotwell taylorotwell deleted the csrf-unserialize branch August 7, 2018 08:10
@ottowayne
Copy link

Is this the reason for the security update? Was a remote code execution possible when you know the app key and can generate encrypted cookies with manipulated serialized objects?

@ngyikp
Copy link
Contributor

ngyikp commented Aug 9, 2018

@ottowayne
Copy link

ottowayne commented Aug 9, 2018

Yeah, looks like you can do some nasty stuff with this. Like running "migrate:fresh --force" using a PendingDispatch which runs Artisan commands on __destruct():

O:41:"Illuminate\Foundation\Bus\PendingDispatch":1:{s:6:"*\job";O:43:"Illuminate\Foundation\Console\QueuedCommand":7:{s:7:"*\data";a:2:{i:0;s:13:"migrate:fresh";i:1;a:1:{s:7:"--force";b:1;}}s:10:"connection";N;s:5:"queue";N;s:15:"chainConnection";N;s:10:"chainQueue";N;s:5:"delay";N;s:7:"chained";a:0:{}}}

But then again your application is probably already compromised if the attacker has the app key.

Also the serialization is disabled for all cookies as of commits
7c90d41
97467e3
d1fc8eb
240d904

@kozmic
Copy link

kozmic commented Aug 16, 2018

For reference, this issue is CVE-2018-15133.

@ottowayne
Copy link

ottowayne commented Aug 16, 2018

@kozmic It doesn't mention the not yet fixed vulnerability of Laravel 4.x though.

@Miguel-Serejo
Copy link

@ottowayne Yes it does.

In Laravel Framework through 5.5.40 and 5.6.x through 5.6.29,

That means all versions up to 5.5.40, and all versions from 5.6.0 to 5.6.29.

@ottowayne
Copy link

Ok, than it was just a translation issue on my side. Thanks for clearing it up 👍

hashman added a commit to hashman/framework that referenced this pull request Mar 25, 2019
Reference:
laravel#25121
laravel@9725a8e

由於 Laravel 5.1 上游已經沒有再 maintain 了,短時間要升級上去有點困難
故自己將這個 patch 上去,自己來 maintain 這個 5.1 的 security issue

hard code `XSRF-TOKEN` 不進行 serialize or unserialize 動作
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants