We - The Zalo Security Lab team - have identified a potential security vulnerability in SRS.
If you are NOT the correct point of contact for this report, please let us know at [email protected]
!
Summary
SRS's /api/v1/vhosts/vid-<id>?callback=<payload>
endpoint didn't filter the callback function name which led to injecting malicious javascript payloads and executing XSS ( Cross-Site Scripting).
![image](https://user-images.githubusercontent.com/38576496/288379847-37b1a2a3-86d7-4272-97f7-bdf64000b2f3.png)
Details
When accessing http://localhost:1985/console/en_index.html?x#/vhosts/vid-<id>
the website will automatically call the callback API endpoint and create a script for it.
![image](https://user-images.githubusercontent.com/38576496/288386192-b1af6513-25c0-4ee9-b7ed-9d1c730549e2.png)
However, the callback function is modifiable which leads to injecting malicious javascript payloads into the callback. Therefore, the attacker can modify the URL into
http://localhost:1985/console/en_index.html?x#/vhosts/vid-xsedfv%3Fcallback=confirm(document.domain)%252f%252f
the XSS will be execute.
![image](https://user-images.githubusercontent.com/38576496/288381064-fac50e67-433b-462b-b7d5-dc35b8161df3.png)
![image](https://user-images.githubusercontent.com/38576496/288456677-a543099b-7a99-47ab-b348-2d038d77b22a.png)
PoC
![image](https://user-images.githubusercontent.com/38576496/288387058-f13507a8-43f3-4efa-8c5c-c5589e478047.png)
Impact
This issue may lead to Cross-Site Scripting.
If the server uses the older version than v5.0.157, v5.0-b1, v6.0.48 this flaw can be used for the earlier Command Injection vulnerability.
We - The Zalo Security Lab team - have identified a potential security vulnerability in SRS.
If you are NOT the correct point of contact for this report, please let us know at
[email protected]
!Summary
SRS's
/api/v1/vhosts/vid-<id>?callback=<payload>
endpoint didn't filter the callback function name which led to injecting malicious javascript payloads and executing XSS ( Cross-Site Scripting).Details
When accessing
![image](https://user-images.githubusercontent.com/38576496/288386192-b1af6513-25c0-4ee9-b7ed-9d1c730549e2.png)
http://localhost:1985/console/en_index.html?x#/vhosts/vid-<id>
the website will automatically call the callback API endpoint and create a script for it.However, the callback function is modifiable which leads to injecting malicious javascript payloads into the callback. Therefore, the attacker can modify the URL into
http://localhost:1985/console/en_index.html?x#/vhosts/vid-xsedfv%3Fcallback=confirm(document.domain)%252f%252f
the XSS will be execute.PoC
Impact
This issue may lead to Cross-Site Scripting.
If the server uses the older version than v5.0.157, v5.0-b1, v6.0.48 this flaw can be used for the earlier Command Injection vulnerability.