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

Security Vulnerability json5 dependency #102

Closed
rippedspine opened this issue Feb 28, 2023 · 4 comments · Fixed by #103
Closed

Security Vulnerability json5 dependency #102

rippedspine opened this issue Feb 28, 2023 · 4 comments · Fixed by #103

Comments

@rippedspine
Copy link
Contributor

Probably not an issue since tsconfig-paths-webpack-plugin is not used in runtime, but we received a Security Vulnerability report of the json5 dependency that is used in this library.

From dependabot:

The parse method of the JSON5 library before and including version 2.2.1 does not restrict parsing of keys named proto, allowing specially crafted strings to pollute the prototype of the resulting object.

This vulnerability pollutes the prototype of the object returned by JSON5.parse and not the global Object prototype, which is the commonly understood definition of Prototype Pollution. However, polluting the prototype of a single object can have significant security impact for an application if the object is later used in trusted operations.

Impact

This vulnerability could allow an attacker to set arbitrary and unexpected keys on the object returned from JSON5.parse. The actual impact will depend on how applications utilize the returned object and how they filter unwanted keys, but could include denial of service, cross-site scripting, elevation of privilege, and in extreme cases, remote code execution.

Mitigation

This vulnerability is patched in json5 v2.2.2 and later. A patch has also been backported for json5 v1 in versions v1.0.2 and later.

@jonaskello
Copy link
Member

jonaskello commented Feb 28, 2023

This is fixed upstream in tsconfig-paths 4.1.2. Would you care to make a PR for the upgrade?

@rippedspine
Copy link
Contributor Author

I have cloned the repo and tested the upgrade, but I cannot make a fork of the repo so I cannot create a PR :/

Screenshot 2023-02-28 at 11 20 35

Screenshot 2023-02-28 at 11 19 55

@jonaskello
Copy link
Member

It says in the screenshot "2 uncommited changes" and no commits beteen dividab:master and your branch. I think perhaps you need to make a commit on the new branch before you make the PR?

@rippedspine
Copy link
Contributor Author

ah, how could I have missed that. Thanks, I have created a PR now

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