Skip to content

[v14] Quote user supplied inputs provided to scripts to avoid RCE#39838

Merged
jentfoo merged 1 commit intobranch/v14from
jent/script_param_rce_fix-v14
Mar 26, 2024
Merged

[v14] Quote user supplied inputs provided to scripts to avoid RCE#39838
jentfoo merged 1 commit intobranch/v14from
jent/script_param_rce_fix-v14

Conversation

@jentfoo
Copy link
Copy Markdown
Contributor

@jentfoo jentfoo commented Mar 26, 2024

Backport #39644 to branch/v14 (minor conflicts with missing aws join implementations)

changelog: Fix for possible phishing links which could result in code execution with install and join scripts

* 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 jentfoo added this pull request to the merge queue Mar 26, 2024
Merged via the queue into branch/v14 with commit f0823d3 Mar 26, 2024
@jentfoo jentfoo deleted the jent/script_param_rce_fix-v14 branch March 26, 2024 16:06
@tcsc tcsc mentioned this pull request Mar 27, 2024
This was referenced Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants