-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Quote user supplied inputs provided to scripts to avoid RCE #39644
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jentfoo
requested review from
marcoandredinis,
AntonAM,
zmb3,
codingllama,
hugoShaka and
rosstimothy
March 20, 2024 23:34
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
rosstimothy
reviewed
Mar 21, 2024
This change introduces the func `utils.UnixShellQuote` which will quote any inputs which could potentially allow execution or script escape. This is utilized to ensure that scripts produced from a potential Phishing link could not contain code execution which may expose a user.
…rameters are extracted This will increase safety moving forward, but it requires a more conservative quoting strategy.
jentfoo
force-pushed
the
jent/script_param_rce_fix
branch
from
March 25, 2024 23:06
2cb2697
to
6b49943
Compare
marcoandredinis
approved these changes
Mar 26, 2024
rosstimothy
approved these changes
Mar 26, 2024
public-teleport-github-review-bot
bot
removed request for
klizhentas,
AntonAM,
zmb3,
codingllama and
hugoShaka
March 26, 2024 13:31
jentfoo
added a commit
that referenced
this pull request
Mar 26, 2024
* Quote user supplied inputs provided to scripts to avoid RCE This change introduces the func `utils.UnixShellQuote` which will quote any inputs which could potentially allow execution or script escape. This is utilized to ensure that scripts produced from a potential Phishing link could not contain code execution which may expose a user. * awsAccessGraphOIDCSync: Ensure role parameter is quoted correctly * join_tokens: Move shell quote to `getJoinScript` rather than where parameters are extracted This will increase safety moving forward, but it requires a more conservative quoting strategy.
jentfoo
added a commit
that referenced
this pull request
Mar 26, 2024
* Quote user supplied inputs provided to scripts to avoid RCE This change introduces the func `utils.UnixShellQuote` which will quote any inputs which could potentially allow execution or script escape. This is utilized to ensure that scripts produced from a potential Phishing link could not contain code execution which may expose a user. * awsAccessGraphOIDCSync: Ensure role parameter is quoted correctly * join_tokens: Move shell quote to `getJoinScript` rather than where parameters are extracted This will increase safety moving forward, but it requires a more conservative quoting strategy.
This was referenced Mar 26, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 26, 2024
…39839) * Quote user supplied inputs provided to scripts to avoid RCE This change introduces the func `utils.UnixShellQuote` which will quote any inputs which could potentially allow execution or script escape. This is utilized to ensure that scripts produced from a potential Phishing link could not contain code execution which may expose a user. * awsAccessGraphOIDCSync: Ensure role parameter is quoted correctly * join_tokens: Move shell quote to `getJoinScript` rather than where parameters are extracted This will increase safety moving forward, but it requires a more conservative quoting strategy.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 26, 2024
…39838) * Quote user supplied inputs provided to scripts to avoid RCE This change introduces the func `utils.UnixShellQuote` which will quote any inputs which could potentially allow execution or script escape. This is utilized to ensure that scripts produced from a potential Phishing link could not contain code execution which may expose a user. * awsAccessGraphOIDCSync: Ensure role parameter is quoted correctly * join_tokens: Move shell quote to `getJoinScript` rather than where parameters are extracted This will increase safety moving forward, but it requires a more conservative quoting strategy.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change introduces the func
utils.UnixShellQuote
which will quote any inputs which could potentially allow execution or script escape. This is utilized for http endpoints which produce scripts, as it's currently possible for a malicious actor to create links which can result in code execution on the victim running the resulting script.fixes https://github.com/gravitational/security-findings/issues/77
fixes https://github.com/gravitational/security-findings/issues/86
changelog: Fix for possible phishing links which could result in code execution with install and join scripts