elm-lang / elm-platform

Bundle of all core development tools for Elm
BSD 3-Clause "New" or "Revised" License
762 stars 125 forks source link

Dependency on Hoek 2.6.3 (Vulnerable) #241

Closed Pavinati closed 6 years ago

Pavinati commented 6 years ago

Installing elm to my dev dependencies with npm added the line "elm": "^0.18.0" to my package.json file, which installs Hoek 2.6.3 with npm install. The dependency in my package-lock.json is resolved as follows elm@0.18.0 -> request@2.74.0 -> hawk@3.1.3 -> hoek@2.16.3

CVE-2018-3728 Moderate severity

hoek node module before 5.0.3 or 4.2.1 suffers from a Modification of Assumed-Immutable Data (MAID) vulnerability

andys8 commented 6 years ago

There is github security warning. Keep in mind, it could hurt elm, if elm 0.18 would be marked as insecure.

image

image

carlthuringer commented 6 years ago

The dependencies were significantly reduced in #194 and available in 0.18.0-exp5. You may upgrade to that release or await 0.19 I think.

jinjor commented 6 years ago

FYI: npm audit in my environment reports as follows.

torii-mac:elm-security-test jinjor$ npm audit

                       === npm audit security report ===                        

# Run  npm install --save-dev elm@1.4.1  to resolve 5 vulnerabilities
SEMVER WARNING: Recommended action is a potentially breaking change
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ hoek                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ elm [dev]                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ elm > request > hawk > boom > hoek                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/566                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ hoek                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ elm [dev]                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ elm > request > hawk > cryptiles > boom > hoek               │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/566                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ hoek                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ elm [dev]                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ elm > request > hawk > hoek                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/566                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ hoek                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ elm [dev]                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ elm > request > hawk > sntp > hoek                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/566                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Memory Exposure                                              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ tunnel-agent                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ elm [dev]                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ elm > request > tunnel-agent                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/598                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

found 5 moderate severity vulnerabilities in 118 scanned packages
  5 vulnerabilities require semver-major dependency updates.

Looks like there is another problematic module tunnel-agent.

(node v8.9.4, npm@6.1.0, elm@0.18.0, request@2.74.0, hawk@3.1.3, hoek@2.16.3, sntp@1.0.9, tunnel-agent@0.4.3)

evancz commented 6 years ago

It appears to be getting updated with the new installers.