You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-2Lines changed: 31 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,15 +42,44 @@ npm run cleanup
42
42
43
43
## Exploiting the vulnerabilities
44
44
45
-
This app uses npm dependencies holding known vulnerabilities.
45
+
This app uses npm dependencies holding known vulnerabilities,
46
+
as well as insecure code that introduces code-level vulnerabilities.
47
+
48
+
The `exploits/` directory includes a series of steps to demonstrate each one.
49
+
50
+
### Vulnerabilities in open source dependencies
46
51
47
52
Here are the exploitable vulnerable packages:
48
53
-[Mongoose - Buffer Memory Exposure](https://snyk.io/vuln/npm:mongoose:20160116) - requires a version <= Node.js 8. For the exploit demo purposes, one can update the Dockerfile `node` base image to use `FROM node:6-stretch`.
One fault here is that the `redirectPage` is rendered as raw HTML and not properly escaped, because it uses `<%- >` instead of `<%= >`. That itself, introduces a Cross-site Scripting (XSS) vulnerability via:
To exploit the open redirect, simply provide a URL such as `redirectPage=https://google.com` which exploits the fact that the code doesn't enforce local URLs in `index.js:72`.
0 commit comments