CVE-2022-22744
High · 8.8CVSS
8.8
EPSS
1.4%
Published
Dec 22, 2022
CISA due date
—
Cloudanix analysis
A browser tool on Windows could let attackers run unwanted commands on a computer if someone copies text from the browser and pastes it into a command window.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Improper escaping of the curl command generated by the Copy as curl feature in DevTools allows command injection when the resulting command string is pasted into a PowerShell prompt on Windows.
Why it matters to the business
Windows users of the affected browsers could experience arbitrary command execution leading to data compromise or malware deployment if they paste copied DevTools output into PowerShell; the issue has existed for nearly four years with only marginal increase in exploitation probability and no known ransomware usage.
How an attack unfolds
An attacker supplies specially crafted request data that, when a user inspects the request in DevTools and selects Copy as curl for PowerShell, produces a command containing injected PowerShell syntax; pasting that command into a PowerShell prompt executes the attacker-supplied instructions.
How to fix it
Upgrade Firefox to 96 or later, Firefox ESR to 91.5 or later, and Thunderbird to 91.5 or later; until patches are applied, avoid pasting any Copy as curl output into PowerShell on Windows systems.
How to confirm the fix worked
Confirm installed versions meet or exceed the fixed releases listed above; test the Copy as curl feature with inputs containing PowerShell metacharacters and verify the output is properly escaped or rejected.
Typical attack path
- Serve or induce a request containing characters that break PowerShell command quoting
- Trick the victim into opening DevTools and using the Copy as curl feature targeting PowerShell
- Victim pastes the copied command string into a PowerShell prompt
- Injected commands execute with the privileges of the PowerShell session
How to detect it
Review PowerShell execution logs and command-line history for strings originating from DevTools curl output; correlate with browser process launches and unusual child processes spawned by powershell.exe.
What your security team should do
- Apply the listed version upgrades to all Windows installations of Firefox, Firefox ESR, and Thunderbird as the highest priority
- Restrict or monitor PowerShell usage for non-administrative users until updates are complete
- Add guidance in internal security awareness materials about the risks of pasting copied command strings
The record
The constructed curl command from the "Copy as curl" feature in DevTools was not properly escaped for PowerShell. This could have lead to command injection if pasted into a Powershell prompt.<br>*This bug only affects Thunderbird for Windows. Other operating systems are unaffected.*. This vulnerability affects Firefox ESR < 91.5, Firefox < 96, and Thunderbird < 91.5.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| SUSE:Enterprise Storage 6 | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Enterprise Storage 7 | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:HPE Helion OpenStack 8 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15-ESPOS | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Linux Enterprise High Performance Computing 15-LTSS | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP3 | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | MozillaFirefox | 0 | 91.5.0-78.159.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise Server 12 SP3-LTSS | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise Server 12 SP4-LTSS | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise Server 12 SP5 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise Server 15 SP1-BCL | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Linux Enterprise Server 15 SP2-BCL | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:Linux Enterprise Server 15-LTSS | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | MozillaFirefox | 0 | 91.5.0-150.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP3 | MozillaThunderbird | 0 | 91.5.0-8.51.1 |
| SUSE:Manager Proxy 4.1 | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:Manager Retail Branch Server 4.1 | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:Manager Server 4.1 | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| SUSE:OpenStack Cloud 8 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:OpenStack Cloud 9 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:OpenStack Cloud Crowbar 8 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| SUSE:OpenStack Cloud Crowbar 9 | MozillaFirefox | 0 | 91.5.0-112.86.1 |
| Ubuntu:18.04:LTS | mozjs38 | 0 | No fix |
| Ubuntu:18.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:20.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:20.04:LTS | mozjs68 | 0 | No fix |
| Ubuntu:22.04:LTS | mozjs78 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mozjs38 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mozjs68 | 0 | No fix |
| Ubuntu:Pro:22.04:LTS | mozjs78 | 0 | No fix |
| openSUSE:Leap 15.3 | MozillaFirefox | 0 | 91.5.0-152.12.1 |
| openSUSE:Leap 15.3 | MozillaThunderbird | 0 | 91.5.0-8.51.1 |
| openSUSE:Leap 15.3 | civetweb | 0 | 1.15-lp153.2.3.1 |
| openSUSE:Tumbleweed | MozillaFirefox | 0 | 96.0-1.1 |
| openSUSE:Tumbleweed | MozillaThunderbird | 0 | 91.5.0-1.1 |
| openSUSE:Tumbleweed | firefox-esr | 0 | 128.5.1-1.1 |
Related vulnerabilities
- CVE-2023-23601 Navigations were being allowed when dragging a URL from a cross-origin iframe into the… Also affects MozillaFirefox
- CVE-2023-23603 Regular expressions used to filter out forbidden properties and values from style… Also affects MozillaFirefox
- CVE-2023-23602 A mishandled security check when creating a WebSocket in a WebWorker caused the Content… Also affects MozillaFirefox
- CVE-2023-23605 Memory safety bugs present in Firefox 108 and Firefox ESR 102.6. Also affects MozillaFirefox
- CVE-2023-23598 Due to the Firefox GTK wrapper code's use of text/plain for drag data and GTK treating… Also affects MozillaFirefox
- CVE-2022-46881 An optimization in WebGL was incorrect in some cases, and could have led to memory… Also affects MozillaFirefox
- CVE-2022-46882 A use-after-free in WebGL extensions could have led to a potentially exploitable crash. Also affects MozillaFirefox
- CVE-2022-46880 A missing check related to tex units could have led to a use-after-free and potentially… Also affects MozillaFirefox