You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing static code analysis, if a parameter received in the API is forwarded directly to the user without validation, a critical vulnerability arises.In the Devika.py file, the /api/get-browser-snapshot endpoint takes the query from the request and sends the specified file to the user. Since there is no filtering or additional validation, any file can be sent to the user.
PoC
The vulnerability arises as you can see from below.
Describe the bug
When performing static code analysis, if a parameter received in the API is forwarded directly to the user without validation, a critical vulnerability arises.In the Devika.py file, the /api/get-browser-snapshot endpoint takes the query from the request and sends the specified file to the user. Since there is no filtering or additional validation, any file can be sent to the user.
PoC
The vulnerability arises as you can see from below.
Url:
![Image](https://private-user-images.githubusercontent.com/87544644/407694156-00f8d317-b345-461b-9c1a-42db937edf28.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMzE1NzAsIm5iZiI6MTczOTIzMTI3MCwicGF0aCI6Ii84NzU0NDY0NC80MDc2OTQxNTYtMDBmOGQzMTctYjM0NS00NjFiLTljMWEtNDJkYjkzN2VkZjI4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDIzNDc1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVjZTE2MmUwYWFhN2E0ZTgyNTk2M2FiNjc3NmM1YmU0NGRkNTQ2N2U0YjFlMmNlODVmYWIxNmJhNzhiNWMzMzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yD3d9k8LbNTOKANUkWSQD5xZ9ACQu3swKU-gTDLPzDs)
File Content:
![Image](https://private-user-images.githubusercontent.com/87544644/407694824-2a3999ad-c8b6-4bfd-bba2-64c4a49e97f8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMzE1NzAsIm5iZiI6MTczOTIzMTI3MCwicGF0aCI6Ii84NzU0NDY0NC80MDc2OTQ4MjQtMmEzOTk5YWQtYzhiNi00YmZkLWJiYTItNjRjNGE0OWU5N2Y4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDIzNDc1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2MWIyY2VlZTc5YTVhMmQyMTg5NmFhNTJkZjRmMDdiZjgyNTdmYWJhNzU5NDcyYzRlODkyMTEwM2NiYzU1YWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.AZSUJBKu0q1wJVOtcZ_Q0FN6TJf3DWusnl6ts5RuYCI)
Vulnerable Code Snippet:
![Image](https://private-user-images.githubusercontent.com/87544644/407695024-b81b4422-c8f0-4997-a1a5-c25ad1986583.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMzE1NzAsIm5iZiI6MTczOTIzMTI3MCwicGF0aCI6Ii84NzU0NDY0NC80MDc2OTUwMjQtYjgxYjQ0MjItYzhmMC00OTk3LWExYTUtYzI1YWQxOTg2NTgzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDIzNDc1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY4Y2RiYTg3YmVlYzI0NGZlYWVkNWU2ZDgwNDA4YTNmNzlmZTFlZTViZmNjOGUyMmY0MDM4MDA5NTYzYmZmNGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.DvuQ6vpyBflZEXzrXdHZyhjgQgsL_mRGzGmOHXXxuAo)
Mitigation
The text was updated successfully, but these errors were encountered: