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

Use %COMSPEC% not "cmd" to prevent hijacking. Fixes #5254 #5255

Merged
merged 3 commits into from Jan 16, 2024

Conversation

JamesParrott
Copy link
Contributor

@JamesParrott JamesParrott commented Dec 24, 2023

Security:

  • Security fix for vulnerability on Windows; Xonsh will no longer execute default cmd commands†
    using a malicious "cmd.bat" file in the current directory.

† cls, copy, del, dir, echo, erase, md, mkdir, mklink, move, rd, ren, rename, rmdir, time, type, & vol

#issuenumber 5254

Copy link

Warning! No news item is found for this PR.
If this is an user facing change/feature/fix, please add a news item by copying the format from news/TEMPLATE.rst.

@JamesParrott
Copy link
Contributor Author

@codecov-commenter
Copy link

codecov-commenter commented Dec 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e3a6dcf) 67.15% compared to head (387f81a) 67.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5255      +/-   ##
==========================================
- Coverage   67.15%   67.12%   -0.04%     
==========================================
  Files         119      119              
  Lines       23124    23124              
  Branches     4855     4855              
==========================================
- Hits        15530    15522       -8     
- Misses       6389     6398       +9     
+ Partials     1205     1204       -1     
Flag Coverage Δ
macOS-latest 64.43% <0.00%> (-0.02%) ⬇️
ubuntu-latest 64.72% <0.00%> (-0.04%) ⬇️
windows-latest 63.09% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jnoortheen
Copy link
Member

This LGTM! any thoughts @anki-code @gforsyth ?

Copy link
Collaborator

@gforsyth gforsyth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

I'll cut a release.

@gforsyth gforsyth merged commit 2db06e7 into xonsh:main Jan 16, 2024
15 checks passed
theadam pushed a commit to theadam/xonsh that referenced this pull request Mar 11, 2024
…#5255)

* Use %COMSPEC% not "cmd" to prevent hijacking. Fixes xonsh#5254

* Update aliases.py

* Update aliases.py

---------

Co-authored-by: Andy Kipp <anki-code@users.noreply.github.com>
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