Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

4.8 KB
Raw Blame

Cloud-metadata hostnames are now blocked from one shared list (ssrf_validator.ALWAYS_BLOCKED_METADATA_HOSTNAMES), under every flag and egress scope. The block applies in validate_url (and so in its callers such as assert_base_url_safe and safe_requests), in the egress policy's evaluate_url and host classification, in the notification URL validator (http(s) URLs and host-bearing plugin schemes such as json:// or ntfy://), and in the search-engine URL settings validator. The list adds IBM Cloud classic's metadata endpoint api.service.softlayer.com to the existing GCP names. Letter case, trailing dots, percent-encoding and IDNA look-alike spellings do not bypass it: ideographic or fullwidth full stops and fullwidth letters fold to the listed name the way the system resolver (getaddrinfo) folds them, a non-ASCII name is also checked in the IDNA 2008 form the HTTP clients connect to, and a non-ASCII name that no IDNA encoding (IDNA 2003, IDNA 2008 or UTS #46) accepts is refused. Previously the IBM name resolved to a private address (10.0.80.88) and passed whenever private addresses were allowed. Limit: this is a hostname block only. 10.0.80.88 itself is deliberately not always-blocked, because users may run their own LAN services (such as a local LLM server) at that address. A different DNS name, or the literal address, that reaches the IBM service is still allowed when private addresses are allowed.

Egress host classification now accepts only plain DNS names and canonical IP literals; every other host spelling is unclassified. This applies to the require-local LLM and embeddings checks, the Elasticsearch and Paperless endpoint checks, llm.allowed_local_hostnames and its save-time validator, which all read a host through one function. A host that contains both : and % as written (an IPv6 address with a zone ID, plain or percent-encoded) is unclassified before any decoding, so an encoded zone ID is never read as part of the address; any other host is percent-decoded exactly once, case folded, one trailing dot dropped, and then accepted only as a name of ASCII letters, digits, hyphens and underscores, or as an IP address written the standard way (dotted-quad IPv4, or IPv6 without a zone ID). An unclassified host, and every cloud-metadata name or address (IPv6 forms that wrap a metadata IPv4 included), is never local and never makes an engine eligible as public: an Elasticsearch or Paperless search engine configured with one is refused under every protected egress scope instead of being treated as a public engine, and such an llm.allowed_local_hostnames entry is ignored and rejected at save. Previously the policy recognised metadata spellings one at a time, and some unusual spellings slipped through. Behaviour change: endpoints written in an unusual spelling that used to work, such as an integer or hex IPv4 address, an internationalised (non-ASCII) host name or an IPv6 address with a zone ID, are now refused by these checks. This affects search.engine.web.elasticsearch.default_params.hosts, search.engine.web.paperless.default_params.api_url, the provider URL checked under llm.require_local_endpoint (llm.<provider>.url), embeddings.ollama.url and embeddings.openai.base_url under embeddings.require_local, and llm.allowed_local_hostnames. Write the host as a plain DNS name (an internationalised name in its xn-- form) or a standard IP address; those classify as before. llm.allowed_local_hostnames entries are now compared case-insensitively and ignoring a trailing dot, so an entry written with capitals now takes effect; a new or changed entry containing % is rejected at save, and an unchanged list is no longer re-validated when other settings are saved. The fetch-time URL check keeps its broader handling and now also refuses a metadata address carried by an IPv6 address in any NAT64, 6to4 or Teredo form, and a host containing control characters.

The Elasticsearch engine now SSRF-validates every configured host before it builds its client, and its availability probe connects only to a host that passed the same check. Each entry is judged as the scheme, host and port the client connects to: a URL string is parsed with the client's own parser (urllib3) and also validated as written; a host dictionary must give an http or https scheme and, if it gives a port, an integer from 1 to 65535, and its host value is validated as given. The host must be a plain host name or IP address without % (so no percent-encoding or IPv6 zone ID), must resolve, and must not be a cloud-metadata name or address; localhost and private addresses, link-local included, stay allowed for this self-hosted engine. A configuration in which any host fails is refused as a whole (fail-closed), including a host that cannot be resolved or 0.0.0.0, and the engine is dropped with a logged error.