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

Possible vulnerability CVE-2021-4279 because of ajv-merge-patch / fast-json-patch #629

Open
joshuanapoli opened this issue Feb 28, 2024 · 2 comments

Comments

@joshuanapoli
Copy link

serverless-appsync-plugin depends on ajv-merge-patch@^5.0.1, which depends on fast-json-patch@^2.0.6, which leads to an CVE-2021-4279 alert for projects that depend on serverless-appsync-plugin.

The ajv-merge-patch#55 would solve the problem, but the maintainer hasn't merge in a year.

Can serverless-appsync-plugin switch away from ajv-merge-patch or move to a fork with the updated dependency?

@bboure
Copy link
Collaborator

bboure commented Feb 29, 2024

Hi Josh,

Thanks for raising this. I'll have a look.

Do you have any concerns about this in the context of this plugin?

I am no expert in security, but my thinking is that this plugin is meant to be a dev dependency that runs on a local machine/CI/CD pipeline. So I would not worry too much about it.

With that said, we probably could get rid of that dependency. $merge is only used here. I'm sure we could find a replacement for it.

@joshuanapoli
Copy link
Author

joshuanapoli commented Mar 1, 2024

I am no expert in security, but my thinking is that this plugin is meant to be a dev dependency that runs on a local machine/CI/CD pipeline. So I would not worry too much about it.

We worry about the security of our CI/CD pipeline, since it handles valuable credentials to our cloud hosting environment and codebase. Not to mention that we would like to trust the generated artifacts.

Do you have any concerns about this in the context of this plugin?

As far as I understand, there could only possibly be an actual vulnerability if untrusted input can somehow reach the $merge. I don't think that is possible in my environment. So the issue is really just a nuisance. In my case, I will have to report the alert and explain why it isn't important to some of our customers.

If you want, I could publish a patched version of ajv-merge-patch. Solving the alert there is trivial. serverless-appsync-plugin could upgrade to use the patched replacement for ajv-merge-patch.

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

No branches or pull requests

2 participants