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

fix(connector-fabric): vulnerability cve-2020-7788 #542

Closed
petermetz opened this issue Feb 5, 2021 · 0 comments · Fixed by #581
Closed

fix(connector-fabric): vulnerability cve-2020-7788 #542

petermetz opened this issue Feb 5, 2021 · 0 comments · Fixed by #581
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file Fabric good-first-issue Good for newcomers Hacktoberfest Hacktoberfest participants are welcome to take a stab at issues marked with this label. Security Related to existing or potential security vulnerabilities
Milestone

Comments

@petermetz
Copy link
Contributor

petermetz commented Feb 5, 2021

Describe the bug

Dependabot cannot update ini to a non-vulnerable version
The latest possible version of ini that can be installed is 1.3.5.

The earliest fixed version is 1.3.6.

Learn more about troubleshooting Dependabot errors.

1 ini vulnerability found in …/cactus-plugin-ledger-connector-fabric/package-lock.json 27 days ago
Remediation
Upgrade ini to version 1.3.6 or later. For example:

"dependencies": {
  "ini": ">=1.3.6"
}

or…

"devDependencies": {
  "ini": ">=1.3.6"
}

Always verify the validity and compatibility of suggestions with your codebase.

Details
CVE-2020-7788
low severity
Vulnerable versions: < 1.3.6
Patched version: 1.3.6
Overview
The ini npm package before version 1.3.6 has a Prototype Pollution vulnerability.

If an attacker submits a malicious INI file to an application that parses it with ini.parse, they will pollute the prototype on the application. This can be exploited further depending on the context.

Patches
This has been patched in 1.3.6

To Reproduce

https://github.com/hyperledger/cactus/security/dependabot/packages/cactus-plugin-ledger-connector-fabric/package-lock.json/ini/open

Steps to reproduce
payload.ini

[proto]
polluted = "polluted"
poc.js:

var fs = require('fs')
var ini = require('ini')

var parsed = ini.parse(fs.readFileSync('./payload.ini', 'utf-8'))
console.log(parsed)
console.log(parsed.__proto__)
console.log(polluted)
> node poc.js
{}
{ polluted: 'polluted' }
{ polluted: 'polluted' }
polluted

Expected behavior

No security warnings/errors.

cc: @takeutak @sfuji822 @hartm @jonathan-m-hamilton @AzaharaC @jordigiam @kikoncuo

@petermetz petermetz added bug Something isn't working Fabric Security Related to existing or potential security vulnerabilities labels Feb 5, 2021
@petermetz petermetz added this to the v0.5.0 milestone Feb 5, 2021
@petermetz petermetz added dependencies Pull requests that update a dependency file good-first-issue Good for newcomers Hacktoberfest Hacktoberfest participants are welcome to take a stab at issues marked with this label. labels Feb 5, 2021
@petermetz petermetz changed the title fix(fabric-connector): fix(connector-fabric ): vulnerability cve-2020-7788 Feb 5, 2021
@petermetz petermetz changed the title fix(connector-fabric ): vulnerability cve-2020-7788 fix(connector-fabric): vulnerability cve-2020-7788 Feb 5, 2021
@kikoncuo kikoncuo self-assigned this Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file Fabric good-first-issue Good for newcomers Hacktoberfest Hacktoberfest participants are welcome to take a stab at issues marked with this label. Security Related to existing or potential security vulnerabilities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants