epi052/feroxbuster · critical

Could not build client

Error message

Could not build client

What it means

Configuration::default() builds a default reqwest-based client via client::initialize and unwraps it with expect. If the TLS/runtime stack cannot build a client (reqwest builder error), the process panics with 'Could not build client', since a scanner cannot operate without an HTTP client.

Solutions

  1. Install/update system CA certificates (ca-certificates package) so the TLS backend can find roots
  2. Obtain a feroxbuster binary matching your platform's TLS stack, or one with rustls and bundled webpki roots
  3. Set SSL_CERT_FILE / SSL_CERT_DIR to a valid CA bundle if the default lookup fails

Example fix

// before (shell)
./feroxbuster -u http://host # missing CA bundle -> panic
// after (shell)
apt-get install ca-certificates && ./feroxbuster -u http://host
Defensive patterns

Strategy: try-catch

Validate before calling

let cert_ok = std::env::var("SSL_CERT_FILE").map(|p| std::path::Path::new(&p).exists()).unwrap_or(true);
if !cert_ok { eprintln!("SSL_CERT_FILE points nowhere"); }

Try / catch

// expect() panics; guard startup itself
match std::panic::catch_unwind(start_feroxbuster) { Err(_) => eprintln!("client init failed: check CA certs / TLS backend"), Ok(v) => v }

Prevention

When it happens

Trigger: client::initialize failing while constructing the default client config — e.g. reqwest::ClientBuilder::build() erroring due to TLS backend initialization failure or missing root certificates on the host.

Common situations: Static binaries built with a TLS backend that cannot load root certificates (missing CA bundle), musl builds with native-tls issues, or rustls setups with no installed process-default crypto provider.

Related errors


AI-assisted analysis of epi052/feroxbuster@1f595dab5c (2026-09-13). Data as JSON: /api/errors/201ffc7f934c44ad. Report an issue: GitHub.

Appendix: source

Thrown at src/config/container.rs:393

impl Default for Configuration {
    /// Builds the default Configuration for feroxbuster
    fn default() -> Self {
        let timeout = timeout();
        let user_agent = user_agent();
        let headers = HashMap::new();
        let client_config = client::ClientConfig {
            timeout,
            user_agent: &user_agent,
            redirects: false,
            insecure: false,
            headers: &headers,
            proxy: None,
            server_certs: Option::<Vec<String>>::None,
            client_cert: None,
            client_key: None,
            scope: &Vec::new(), // no scope by default
        };
        let client = client::initialize(client_config).expect("Could not build client");
        let replay_client = None;
        let status_codes = status_codes();
        let replay_codes = status_codes.clone();
        let kind = serialized_type();
        let output_level = OutputLevel::Default;
        let requester_policy = RequesterPolicy::Default;
        let extract_links = extract_links();

        Configuration {
            kind,
            client,
            timeout,
            user_agent,
            replay_codes,
            status_codes,
            extract_links,
            replay_client,
            requester_policy,

View on GitHub (pinned to 1f595dab5c)