adobe / reactor-sandbox

Tasks for creating a sandbox for manually testing Adobe Experience Platform Tags extensions.
Apache License 2.0
7 stars 15 forks source link

Babel vulnerable to arbitrary code execution when compiling specifically crafted malicious code #95

Open yuhui opened 7 months ago

yuhui commented 7 months ago

Expected Behaviour

@babel/traverse v7.23.2 or higher is used.

Actual Behaviour

@babel/traverse v7.15.4 is used in package.json. https://github.com/adobe/reactor-sandbox/blob/4d7e0c088316821484c42f6f13ebdca33ed72af0/package.json#L55

More information

I received this Github dependabot alert in my repository for my Launch extension:

Impact

Using Babel to compile code that was specifically crafted by an attacker can lead to arbitrary code execution during compilation, when using plugins that rely on the path.evaluate() or path.evaluateTruthy() internal Babel methods.

Known affected plugins are:

Users that only compile trusted code are not impacted.

Patches

The vulnerability has been fixed in @babel/traverse@7.23.2.

Babel 6 does not receive security fixes anymore (see Babel's security policy), hence there is no patch planned for babel-traverse@6.

Workarounds

brenthosie commented 6 months ago

@adobe export issue to Jira project PDCL as Story

github-jira-sync-bot commented 6 months ago

:white_check_mark: Jira issue PDCL-11715 is successfully created for this GitHub issue.

brenthosie commented 6 months ago

@yuhui will you try installing @adobe/reactor-sandbox@next and let me know if that meets the need? I'm personally testing with this version as well with an extension I'm developing for an edge extension.

yuhui commented 6 months ago

@brenthosie @adobe/reactor-sandbox@next seems to work properly for me. I did not run into any problems when running the sandbox locally in various projects.