Copy As Curl(Windows) Lead to Code Execution in Linux
Categories
(DevTools :: Netmonitor, defect, P2)
Tracking
(firefox-esr115139+ fixed, firefox-esr128139+ fixed, firefox137 wontfix, firefox138 wontfix, firefox139+ fixed)
People
(Reporter: ameenbasha111, Assigned: bomsy)
References
(Blocks 2 open bugs)
Details
(Keywords: csectype-priv-escalation, reporter-external, sec-moderate, Whiteboard: [client-bounty-form] [adv-main139+] [adv-esr115.24+] [adv-esr128.11+])
Attachments
(6 files, 2 obsolete files)
|
2.49 MB,
video/mp4
|
Details | |
|
6.85 MB,
video/mp4
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr115+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr128+
|
Details | Review |
|
283 bytes,
text/plain
|
Details |
Hi team, Firefox latest version lead to Code Execution on linux machine using copy as curl(windows) feature
The body parameters was not properly sanitized leads to code execution on linux environment
Steps to reproduce
- Send the request with malicious code in the body
- Now from network tab copy the request as curl (windows)
- paste it in bash shell and you can find the whoami command executed
Malcious request
fetch("https://example.com/postit", {
credentials: "omit",
headers: {
"Accept-Language": "en-US",
"Content-Type": "text/plain",
},
body: "query=evil\n\nwhoami",
method: "POST",
});
My another vice versa issue reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1949994
Note: Chrome is not vulnerable for this, I have showed this in poc video too.
This should be prevented similar to chrome to avoid accidental code execution on linux while working with multiple environment
Updated•1 year ago
|
Updated•1 year ago
|
| Reporter | ||
Comment 3•1 year ago
|
||
@frederik seems there is some misunderstanding in marking the bugs as duplicate.
1949994 - Copy as curl (posix) feature
1950001(this ticket) - Copy as curl (windows) feature
Both these options are having separate code base and separate options in firefox browser, it will not be fall under duplication.
Kindly reopen this bug.
Comment 4•1 year ago
|
||
I agree that this might require more than one fix. However, I think we would all benefit if there was a single discussion in this one bug instead of 3 fragmented discussions.
| Reporter | ||
Comment 5•1 year ago
|
||
(In reply to Frederik Braun [:freddy] from comment #4)
I agree that this might require more than one fix. However, I think we would all benefit if there was a single discussion in this one bug instead of 3 fragmented discussions.
It will be fine for a fix discussion, but feature wise it was a 2 different area and here it affects my bounty too if it was handled in single ticket though the fix needs to be in multiple place.
So kindly track this as separate one for bounty
Updated•1 year ago
|
Comment 6•1 year ago
|
||
I suspect this is actually in the same code and won't require a separate fix, but we can make this "depends on" for now.
Updated•1 year ago
|
Comment 7•1 year ago
|
||
The severity field is not set for this bug.
:Honza, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Comment 8•1 year ago
|
||
The severity field is not set for this bug.
:Honza, could you have a look please?
For more information, please visit BugBot documentation.
Bomsy, please set priority and severity for this bug, thank you.
| Assignee | ||
Updated•1 year ago
|
| Reporter | ||
Comment 11•1 year ago
|
||
(In reply to Daniel Veditz [:dveditz] from comment #6)
I suspect this is actually in the same code and won't require a separate fix, but we can make this "depends on" for now.
HI Team, the issue 1949994 is fixed and closed now and i have tested the same in firefox nightly and it is not reproduced. Escaped with ^
As stated by myself before, fix of 1949994 will not fix this issue, since these 2 are handled in different methods it requires fixes in 2 different places.
Kindly initiate a separate fix for this issue. Also since it remains unfixed even after the 1949994 closed it will be considered as an separate issue as stated in comment 3
Note: As stated in description chrome is not vulnerable for this case (It was showed in the first poc video attached)
| Reporter | ||
Comment 12•1 year ago
|
||
I have attached a video poc to show 1949994 is fixed in nightly but 1950001 is still vulnerable
| Assignee | ||
Comment 13•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 14•1 year ago
|
||
Comment 15•1 year ago
|
||
Comment 16•1 year ago
|
||
Backed out for causing xpcshell failures on test_curl.js.
Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=B[…]pcshell&revision=5e3231d83f0df129847e9ec56658d5b82cfbc37b
Failure log: https://treeherder.mozilla.org/logviewer?job_id=501986848&repo=autoland&lineNumber=4342
Backout link: https://hg.mozilla.org/integration/autoland/rev/56155463023a4bb562d4446d675573c2b908f8c1
[task 2025-04-02T07:08:06.963Z] 07:08:06 INFO - TEST-PASS | devtools/client/shared/test/xpcshell/test_curl.js | - host header ignored - to be generated from url - true == true
[task 2025-04-02T07:08:06.963Z] 07:08:06 WARNING - TEST-UNEXPECTED-FAIL | devtools/client/shared/test/xpcshell/test_curl.js | - accept header present in curl command - false == true
[task 2025-04-02T07:08:06.963Z] 07:08:06 INFO - D:/task_174357691395686/build/tests/xpcshell/tests/devtools/client/shared/test/xpcshell/test_curl.js:null:45
Updated•1 year ago
|
| Reporter | ||
Comment 17•11 months ago
|
||
Friendly Reminder, The changes are approved 12 days back, but seems due to test case failure it was pending, can you guys update on this?
Comment 19•11 months ago
|
||
| Assignee | ||
Updated•11 months ago
|
Comment 20•11 months ago
|
||
Comment 21•11 months ago
|
||
Comment 22•11 months ago
|
||
Backed out for causing xpcshell failures of test_curl.js:
https://hg.mozilla.org/integration/autoland/rev/d1cfe436879aa5f39e94e0781d10f2f792d30d9a
Push with failures
Failure log
[task 2025-04-15T11:37:57.519Z] 11:37:57 INFO - TEST-PASS | devtools/client/shared/test/xpcshell/test_curl.js | - host header ignored - to be generated from url - true == true
[task 2025-04-15T11:37:57.519Z] 11:37:57 WARNING - TEST-UNEXPECTED-FAIL | devtools/client/shared/test/xpcshell/test_curl.js | - accept header present in curl command - false == true
[task 2025-04-15T11:37:57.519Z] 11:37:57 INFO - D:/task_174471600302589/build/tests/xpcshell/tests/devtools/client/shared/test/xpcshell/test_curl.js:null:45
Comment 23•11 months ago
|
||
Comment 24•11 months ago
|
||
Comment 25•11 months ago
|
||
Backed out changeset 875d51727bbd for causing xpcshell failures on test_curl
Comment 26•11 months ago
|
||
| Assignee | ||
Updated•11 months ago
|
Comment 27•11 months ago
|
||
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Comment 28•10 months ago
|
||
:bomsy could you please add uplift requests for ESR115 and ESR128
| Assignee | ||
Comment 29•10 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D243110
Updated•10 months ago
|
| Assignee | ||
Comment 30•10 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D243110
Updated•10 months ago
|
| Assignee | ||
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Comment 31•10 months ago
|
||
| uplift | ||
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Comment 32•10 months ago
|
||
| uplift | ||
Comment 33•10 months ago
|
||
| uplift | ||
Comment 34•10 months ago
|
||
| uplift | ||
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Comment 35•10 months ago
|
||
Comment 36•10 months ago
|
||
Comment 37•10 months ago
|
||
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Updated•3 months ago
|
Description
•