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

chore: bump up vm2 version [SECURITY] #440

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 21, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
vm2 3.9.16 -> 3.9.18 age adoption passing confidence
vm2 3.9.14 -> 3.9.16 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

CVE-2023-30547

There exists a vulnerability in exception sanitization of vm2 for versions up to 3.9.16, allowing attackers to raise an unsanitized host exception inside handleException() which can be used to escape the sandbox and run arbitrary code in host context.

Impact

A threat actor can bypass the sandbox protections to gain remote code execution rights on the host running the sandbox.

Patches

This vulnerability was patched in the release of version 3.9.17 of vm2.

Workarounds

None.

References

PoC - https://gist.github.com/leesh3288/381b230b04936dd4d74aaf90cc8bb244

For more information

If you have any questions or comments about this advisory:

  • Open an issue in VM2

Thanks to Xion (SeungHyun Lee) of KAIST Hacking Lab for disclosing this vulnerability.

CVE-2023-32314

A sandbox escape vulnerability exists in vm2 for versions up to 3.9.17. It abuses an unexpected creation of a host object based on the specification of Proxy.

Impact

A threat actor can bypass the sandbox protections to gain remote code execution rights on the host running the sandbox.

Patches

This vulnerability was patched in the release of version 3.9.18 of vm2.

Workarounds

None.

References

PoC - https://gist.github.com/arkark/e9f5cf5782dec8321095be3e52acf5ac

For more information

If you have any questions or comments about this advisory:

  • Open an issue in VM2

Thanks to @​arkark (Takeshi Kaneko) of GMO Cybersecurity by Ierae, Inc. for disclosing this vulnerability.

CVE-2023-32313

In versions 3.9.17 and lower of vm2 it was possible to get a read-write reference to the node inspect method and edit options for console.log.

Impact

A threat actor can edit options for console.log.

Patches

This vulnerability was patched in the release of version 3.9.18 of vm2.

Workarounds

After creating a vm make the inspect method readonly with vm.readonly(inspect).

References

PoC - https://gist.github.com/arkark/c1c57eaf3e0a649af1a70c2b93b17550

For more information

If you have any questions or comments about this advisory:

  • Open an issue in VM2

Thanks to @​arkark (Takeshi Kaneko) of GMO Cybersecurity by Ierae, Inc. for disclosing this vulnerability.

CVE-2023-29017

vm2 was not properly handling host objects passed to Error.prepareStackTrace in case of unhandled async errors.

  • vm2 version: ~3.9.14
  • Node version: 18.15.0, 19.8.1, 17.9.1

Impact

A threat actor can bypass the sandbox protections to gain remote code execution rights on the host running the sandbox.

Patches

This vulnerability was patched in the release of version 3.9.15 of vm2.

Workarounds

None.

CVE-2023-29199

There exists a vulnerability in source code transformer (exception sanitization logic) of vm2 for versions up to 3.9.15, allowing attackers to bypass handleException() and leak unsanitized host exceptions which can be used to escape the sandbox and run arbitrary code in host context.

Impact

A threat actor can bypass the sandbox protections to gain remote code execution rights on the host running the sandbox.

Patches

This vulnerability was patched in the release of version 3.9.16 of vm2.

Workarounds

None.

References

Github Issue - https://github.com/patriksimek/vm2/issues/516
PoC - https://gist.github.com/leesh3288/f05730165799bf56d70391f3d9ea187c

For more information

If you have any questions or comments about this advisory:

  • Open an issue in VM2

Thanks to Xion (SeungHyun Lee) of KAIST Hacking Lab for disclosing this vulnerability.


Release Notes

patriksimek/vm2 (vm2)

v3.9.18

Compare Source

[fix] Multiple security fixes.
[new] Add resolver API to create a shared resolver for multiple NodeVM instances allowing to cache scripts and increase sandbox startup times.
[new] Allow to pass a function to require.context which is called with the filename allowing to specify the context pre file.

v3.9.17

Compare Source

[fix] Multiple security fixes.


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@perfsee
Copy link

perfsee bot commented Jul 21, 2023

perfsee

Bundle main

diff ------------------- Bundle Size Diff -------------------------

@@                       EntryPoint: main                        @@
##                       main …vulnerability                 +/- ##
===================================================================
= Bundle              3.31 MB        3.31 MB                       
= Initial JS          1.12 MB        1.12 MB                       
= Initial CSS             0 B            0 B                       
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
= Assets                   79             79                       
= Chunks                   78             78                       
= Packages                 81             81                       
= Duplicates                0              0                       

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.75%. Comparing base (df39ee3) to head (641eaa9).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #440      +/-   ##
==========================================
- Coverage   78.76%   78.75%   -0.02%     
==========================================
  Files         409      409              
  Lines       38248    38248              
  Branches     2306     2306              
==========================================
- Hits        30126    30122       -4     
- Misses       7920     7924       +4     
  Partials      202      202              

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

@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch 2 times, most recently from 40755b6 to 614d1fb Compare August 1, 2023 14:28
@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch from 614d1fb to 2c54eb2 Compare August 9, 2023 15:24
@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch 2 times, most recently from 5b1d7f9 to 402c439 Compare August 27, 2023 11:35
@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch from 402c439 to 9a43a2c Compare September 19, 2023 10:56
@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch 2 times, most recently from d5a2b66 to 1d3cce7 Compare September 28, 2023 13:08
@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch from 1d3cce7 to db0fe92 Compare October 25, 2023 11:20
@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch from db0fe92 to c5d6655 Compare November 16, 2023 12:58
@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch from c5d6655 to 9b0ef68 Compare December 1, 2023 21:58
@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch from 9b0ef68 to f9c1e7b Compare January 28, 2024 09:32
@renovate renovate bot force-pushed the renovate/npm-vm2-vulnerability branch from f9c1e7b to 641eaa9 Compare February 4, 2024 11:50
Copy link
Contributor Author

renovate bot commented Mar 2, 2024

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
/opt/containerbase/tools/corepack/0.28.0/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:23250
  const isURL = URL.canParse(range);
                    ^

TypeError: URL.canParse is not a function
    at parseSpec (/opt/containerbase/tools/corepack/0.28.0/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:23250:21)
    at loadSpec (/opt/containerbase/tools/corepack/0.28.0/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:23313:11)
    at async Engine.findProjectSpec (/opt/containerbase/tools/corepack/0.28.0/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:23487:22)
    at async Engine.executePackageManagerRequest (/opt/containerbase/tools/corepack/0.28.0/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:23539:24)
    at async Object.runMain (/opt/containerbase/tools/corepack/0.28.0/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:24232:5)

Copy link
Contributor Author

renovate bot commented Jun 4, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:22534
    throw new Error(
          ^

Error: Error when performing the request to https://registry.npmjs.org/yarn/latest; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
    at fetch (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:22534:11)
    at async fetchAsJson (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:22548:20)
    ... 4 lines matching cause stack trace ...
    at async Object.runMain (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:24007:5) {
  [cause]: TypeError: globalThis.fetch is not a function
      at fetch (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:22528:33)
      at async fetchAsJson (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:22548:20)
      at async fetchLatestStableVersion (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:22475:20)
      at async fetchLatestStableVersion2 (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:22598:14)
      at async Engine.getDefaultVersion (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:23208:23)
      at async Engine.executePackageManagerRequest (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:23300:47)
      at async Object.runMain (/opt/containerbase/tools/corepack/0.28.2/16.19.0/node_modules/corepack/dist/lib/corepack.cjs:24007:5)
}

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.

None yet

0 participants