Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CVE-2024-43488: RCE vulnerability in original vscode-arduino code #45

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

Open
ahmsec opened this issue Oct 31, 2024 · 4 comments
Open

CVE-2024-43488: RCE vulnerability in original vscode-arduino code #45

ahmsec opened this issue Oct 31, 2024 · 4 comments
Assignees
Labels
bug Something isn't working critical enhancement New feature or request

Comments

@ahmsec
Copy link

ahmsec commented Oct 31, 2024

Hello folks,

The original https://github.com/microsoft/vscode-arduino code (which this repo forked from) has a remote code execution vulnerability. That is why the extension was deprecated. Please see the link below for details.

https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43488

It may be worth validating whether the vulnerability was transferred to this repo.

@lersi
Copy link

lersi commented Oct 31, 2024

Hello Ahmad,
Thanks for letting me know.
This fork is almost fully 1:1 with microsoft’s repo, the difference is only minor bug fixes and improvements.

I cannot see technical details about the vulnerability on microsoft’s page, do you know where can I find additional details so I could fix this ASAP.

@lersi lersi added bug Something isn't working enhancement New feature or request labels Oct 31, 2024
@lersi lersi self-assigned this Oct 31, 2024
@lersi lersi added the critical label Oct 31, 2024
@MatthewSteeves
Copy link

@ahmsec Good catch but I don’t think it is why Microsoft stopped development. Have you read
their statement over in the repo?

@ahmsec
Copy link
Author

ahmsec commented Nov 1, 2024

@MatthewSteeves Fair enough. When I reported this vulnerability to Microsoft, they said their resolution was to deprecate the plugin. So the vulnerability may have been a contributing factor, if not the entire reason, for deprecation.

@lersi The core issue is that the plugin launches an unauthenticated localhost webserver. This webserver exposes sensitive capabilities. Anyone who can send network requests to this webserver (say a malicious webpage) can exploit the capabilities of the webserver.

To reproduce:

  1. Activate the plugin
  2. Run sudo netstat -tunpl and note the webserver's port
  3. Run curl -X POST -H 'Content-Type: application/json' --data '{"link": "https://www.example.com/"}' http://localhost:55842/api/openlink (but first update the port).

The full RCE exploit is a bit more involved. I plan to share it at a later time. But the crux of the matter is this exposed webserver.

My suggestion would be to remove the webserver entirely, and use a different IPC mechanism between the UI and the code that invokes arduino-cli.

@MatthewSteeves
Copy link

@ahmsec Ahh ok - interesting! Given their response, I would agree it may well have factored in. Thanks for the additional background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants