Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2018-19052 PoC — lighttpd ‘mod_alias_physical_handler’函数路径遍历漏洞

Source
Associated Vulnerability
Title: lighttpd ‘mod_alias_physical_handler’函数路径遍历漏洞 (CVE-2018-19052)
Description:An issue was discovered in mod_alias_physical_handler in mod_alias.c in lighttpd before 1.4.50. There is potential ../ path traversal of a single directory above an alias target, with a specific mod_alias configuration where the matched alias lacks a trailing '/' character, but the alias target filesystem path does have a trailing '/' character.
Description
PoC for a security: potential path traversal with specific configs, if `mod_dirlisting` were enabled, which is not the default, this would result in listing the contents of the directory above the alias..
Readme
# cve-2022-19052

`[mod_alias]` security: potential path traversal with specific configs  
Security: potential path traversal of a single directory above the alias  
target with a specific mod_alias config where the alias which is matched  
does not end in `/`, but alias target filesystem path does end in `/`.

```
e.g. server.docroot = "/srv/www/host/HOSTNAME/docroot"
     alias.url = ( "/img" => "/srv/www/hosts/HOSTNAME/images/" )
```

If a malicious URL "/img../" were passed, the request would be  
for directory "/srv/www/hosts/HOSTNAME/images/../" which would resolve  
to "/srv/www/hosts/HOSTNAME/".  If mod_dirlisting were enabled, which  
is not the default, this would result in listing the contents of the  
directory above the alias.  An attacker might also try to directly  
access files anywhere under that path, which is one level above the  
intended aliased path.

## CVE credit: 
```
Orange Tsai(@orange_8361) from DEVCORE
Script by 1vere$k
```

## Usage 

```
1. git clone https://github.com/iveresk/cve-2018-19052.git
2. cd cve-2018-19052
3. chmod +x cve-2018-19052.sh
4. ./cve-2018-19052.sh -t <IP> or ./cve-2018-19052.sh -f <File_Name>
```

## Contact
You are free to contact me via [Keybase](https://keybase.io/1veresk) for any details. 
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →