Lucene search

K
huntrHaxatron4386FD8B-8C80-42BB-87B8-B506C46597DE
HistoryDec 05, 2021 - 6:00 p.m.

Server-Side Request Forgery (SSRF) in snipe/snipe-it

2021-12-0518:00:16
haxatron
www.huntr.dev
13
ssrf
slack integration
port scanning
internal network
web servers
vulnerability
fix
bug bounty

EPSS

0.001

Percentile

41.1%

Description

Admin users on the external network can perform blind POST-based SSRF (issue requests on behalf of the server into the internal network) via the Slack Integration

Performing portscans

1: Go to Slack Integrations

2: Use http://127.0.0.1:1337 as the Slack Endpoint. See the error message:
cURL error 7: Failed to connect to 127.0.0.1 port 1337: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
Indicating that requests can be made to 127.0.0.1 and that port 1337 on 127.0.0.1 is closed.

Interacting with internal webservices

1: We will setup a server in the internal network for demonstration purposes.

2: Run the following NodeJS code

var express = require('express')
var app = express()

app.post('/shutdown', function(request, response) {
  console.log("Server shutting down")
  process.exit( );
})

const port = 3000
const ip = '0.0.0.0'
app.listen(port, ip)
console.log(`Listening at http://localhost:${port}`)

3: Now input http://[NODE-SERVER-IP]:3000/shutdown and watch the server shutdown.

Impact

This vulnerability is capable of port-scanning of the internal network, issue POST requests to web servers on the internal network which can be escalated to higher-impact.

Recommended Fix

Only allow the integration URL if the host === hooks.slack.com

OR only allow the XXXXX portion of the hooks.slack.com/XXXXXX from frontend and append to “hooks.slack.com/” string in backend

EPSS

0.001

Percentile

41.1%

Related for 4386FD8B-8C80-42BB-87B8-B506C46597DE