Skip to content

Conversation

bkollmar
Copy link

@bkollmar bkollmar commented Mar 21, 2025

Overview

In OWASP Juice Shop, a 302 redirect occurred after the SSTI payload was sent. This caused the POST response to contain information describing the redirect instead of proof that this field was vulnerable to SSTI. By adding one extra line allowing the sendandreceive function to follow the redirect the POST response now contains the changed username that proves there is an SSTI vulnerability and an alert is raised.

Related Issues

This solves issue #8816

Checklist

  • Update help
  • Update changelog
  • Run ./gradlew spotlessApply for code formatting
  • Write tests
  • Check code coverage
  • Sign-off commits
  • Squash commits
  • Use a descriptive title

Copy link

github-actions bot commented Mar 21, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@bkollmar
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@thc202 thc202 changed the title Added Detection for SSTI when a Redirect Occurs ascanrules: Added Detection for SSTI when a Redirect Occurs Mar 21, 2025
@kingthorin
Copy link
Member

Please investigate the unit test failures. Your change seems to have impacted some expected behaviour.

You should add test(s) to cover the new behaviour as well.

Also CHANGELOG.md should be updated.

@psiinon
Copy link
Member

psiinon commented Mar 21, 2025

Logo
Checkmarx One – Scan Summary & Details2e3a1199-e07e-4723-940a-16e60be8a32f

New Issues (5)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
HIGH CVE-2025-27152 Npm-axios-1.7.4
detailsRecommended version: 1.8.2
Description: Axios is a promise-based HTTP client for the browser and node.js. The issue occurs when passing absolute URLs rather than protocol-relative URLs to...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: BNiaFb57%2BJdfsloXeRcbKdUGSNLP872v8XDr3eMoTJw%3D
Vulnerable Package
MEDIUM CVE-2024-55565 Npm-nanoid-3.3.7
detailsRecommended version: 3.3.8
Description: The package nanoid versions through 3.3.7 and 4.0.0 through 5.0.8 mishandle non-integer values.
Attack Vector: NETWORK
Attack Complexity: LOW

ID: y7rwBIK8%2FbhxO%2B%2F27TLd0fZ9zkq0ybmmBwE3pts%2FuRA%3D
Vulnerable Package
MEDIUM CVE-2025-31125 Npm-vite-4.5.9
detailsRecommended version: 4.5.10
Description: Vite is a frontend tooling framework for javascript. Vite exposes the content of non-allowed files using `?inline&import` or `?raw?import`. Only ap...
Attack Vector: NETWORK
Attack Complexity: HIGH

ID: Hl0CL0%2FEnqOVE1vl2S9OxTNLQM6YYvF2%2F1bfI%2FXJUVc%3D
Vulnerable Package
MEDIUM CVE-2025-31486 Npm-vite-4.5.9
detailsRecommended version: 4.5.10
Description: A vulnerability in Vite allows the contents of arbitrary files to be returned to the browser. By appending "?.svg" along with "?.wasm?init" or sett...
Attack Vector: NETWORK
Attack Complexity: HIGH

ID: TJkiunitQSbfjiU8Wc%2Bt6FGH6wJyQXWeANtTo4kbBCc%3D
Vulnerable Package
MEDIUM Cxbb85e86c-2fac Npm-esbuild-0.18.20
detailsRecommended version: 0.25.0
Description: esbuild is an extremely fast bundler for the web, allowing any website to send any request to the development server and read the response due to d...
Attack Vector: NETWORK
Attack Complexity: HIGH

ID: tJSbfBK4zf3YvqC4NxdpVHGx4UPZWeqFFyhxo4Pop%2Bw%3D
Vulnerable Package
Fixed Issues (9)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM Use_Of_Hardcoded_Password /addOns/authhelper/src/main/java/org/zaproxy/addon/authhelper/internal/AuthenticationBrowserHook.java: 44
MEDIUM Use_Of_Hardcoded_Password /addOns/authhelper/src/test/java/org/zaproxy/addon/authhelper/internal/ClientSideHandlerUnitTest.java: 67
MEDIUM Use_Of_Hardcoded_Password /addOns/authhelper/src/test/java/org/zaproxy/addon/authhelper/AuthDiagnosticCollectorUnitTest.java: 236
LOW Heap_Inspection /addOns/authhelper/src/main/java/org/zaproxy/addon/authhelper/internal/db/TableJdo.java: 78
LOW Heap_Inspection /addOns/authhelper/src/main/java/org/zaproxy/addon/authhelper/AuthUtils.java: 466
LOW Heap_Inspection /addOns/authhelper/src/main/java/org/zaproxy/addon/authhelper/AuthTestDialog.java: 264
LOW Heap_Inspection /addOns/authhelper/src/test/java/org/zaproxy/addon/authhelper/AuthUtilsUnitTest.java: 994
LOW Heap_Inspection /addOns/authhelper/src/test/java/org/zaproxy/addon/authhelper/AuthUtilsUnitTest.java: 971
LOW Heap_Inspection /addOns/authhelper/src/test/java/org/zaproxy/addon/authhelper/AuthUtilsUnitTest.java: 1018

@bkollmar bkollmar force-pushed the SSTIRedirect branch 2 times, most recently from 5447876 to 689c92e Compare April 22, 2025 19:10
@bkollmar bkollmar marked this pull request as draft April 23, 2025 17:57
…tatus of redirect

created a work around instead of following a redirect to avoid SSRF

fixed formatting

removed getting the Location header
@bkollmar
Copy link
Author

I am still struggling to find out why an SSRF vulnerability has been introduced in my code. I thought changing it to not follow redirects would solve this, but it hasn't. Any thoughts? Or advice on how to get more details on why/where this vulnerability may be emerging?

@kingthorin
Copy link
Member

Are you referring to something in the results above from psiinon? You can ignore that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants