SSL Certificate Cannot Be Trusted (Nessus 51192): is it real, how to fix it, what to tell the customer
Facts
- Scanner finding
- KB-F-0006 · Web and API, Cloud and infrastructure
- Also known as
- SSL Certificate Cannot Be Trusted, SSL Self-Signed Certificate, SSL Certificate Expiry, SSL Certificate with Wrong Hostname
- Tool IDs
- Nessus 51192 "SSL Certificate Cannot Be Trusted"; often reported with it: Nessus 57582 "SSL Self-Signed Certificate", 15901 "SSL Certificate Expiry", 45411 "SSL Certificate with Wrong Hostname"; nuclei
untrusted-root-certificate,self-signed-ssl,expired-ssl,mismatched-ssl-certificate; testssl.shcert_chain_of_trust("Chain of trust"); Burp 0x01000100 "TLS certificate"; SSL Labs grade T (not trusted) and M (name mismatch) - Standard
- RFC 8446 §4.4.2, the certificate list a TLS server sends; CWE-295, as Burp cites it
- Lab
- scanner-findings-b2, runs 1 to 6 on 2026-11-28: nginx 1.30.8, Apache httpd 2.4.71, Node.js 22, a private lab CA, images pinned by digest
- Test
tests/cert-trust.sh host:port [name], fails on the vulnerable targets, passes after the fix- Next review
- 2027-05-28
Short answer
Nessus 51192 (with 57582, 15901, 45411; nuclei SSL templates; testssl.sh chain of trust; Burp 0x01000100) means the scanner could not link your certificate to a root it trusts. Usual causes: a missing intermediate, an internal CA, a self-signed or expired certificate. Check with openssl s_client, not a browser, since browsers fill in missing intermediates. Fix: serve the full chain, leaf first. For an internal CA, give the scanner your root.
1. What the scanner saw
Tenable's plugin code is not public, so the trigger comes from the plugin page. 51192 fires when the chain the server sent breaks in one of three ways: its top does not lead to "a known public certificate authority" (an unknown or self-signed root, or a missing intermediate), a certificate in it is outside its validity dates, or a signature "didn't match" or "could not be verified" (Tenable 51192). Tenable rates it Medium. A wrong host name is a separate plugin, 45411, and an expired certificate also raises 15901. 57582 covers only chains that end in a self-signed certificate (Tenable 57582).
The other tools differ in ways that matter when you re-scan to prove a fix:
nuclei reads flags computed by its TLS library, tlsx. Its
untrustedflag is true only when the chain the server sent contains a self-signed CA certificate that is not in tlsx's root list (tlsx v1.2.2IsUntrustedCA). In our lab,untrusted-root-certificatestayed silent for a missing intermediate, an unknown CA without its root, and a wrong intermediate. It fired only when we appended the unknown root to the chain.testssl.sh runs
openssl verifyagainst several root stores, using the intermediates the server sent, and names codes 20 and 21 "chain incomplete" (testssl.sh 3.2.5 source).--add-caadds your own root.SSL Labs gives T when the certificate is not trusted and M when the name does not match (SSL Labs rating guide).
2. Is it real on your system?
Run this from any machine with OpenSSL 3, against the host and port in the report:
echo | openssl s_client -connect app.example.com:443 -servername app.example.com \
-verify_hostname app.example.com -showcerts 2>/dev/null | grep -E '^ *[0-9]+ s:|Verify return code'
Our lab server without its intermediate printed this (recorded in run 4, with -CAfile pointing at the lab root, since no public CA knows it):
0 s:CN=ngx-cert
Verify return code: 21 (unable to verify the first certificate)
The fixed server printed two s: lines, the leaf and the intermediate, and Verify return code: 0 (ok). The other codes we saw: 18 self-signed, 10 expired, 9 not yet valid, 62 host name mismatch, 64 IP address mismatch, 20 for an unknown CA, 19 for an unknown CA whose root the server also sent.
curl -sS -o /dev/null https://app.example.com/ is a second opinion. Against the leaf-only server it failed with curl: (60) SSL certificate problem: unable to get local issuer certificate.
Causes of a wrong answer, each seen in our lab or in the sources:
"It works in my browser." Browsers fill in the missing intermediate. nginx's documentation says browsers "usually store intermediate certificates which they receive" (nginx HTTPS servers), and Firefox downloads all intermediates of the public CAs in advance (Mozilla). API clients,
curl, mobile apps and webhook senders fail. A green padlock does not refute this finding.0 (ok)without a certificate. Against our plain-HTTP port,openssl s_clientprintedVerification: OKandVerify return code: 0 (ok)although no certificate arrived. A script that greps for0 (ok)reports a fix on a port that does not speak TLS. Check that thes:lines are there.Your machine already holds the intermediate. With the intermediate in the client's trust file, a plain
s_clientagainst the leaf-only server printed0 (ok). Our test compares the verified chain with the certificates the server sent, and fails it.A clean nuclei run is not a fix. As above,
untrusted-root-certificatemisses the most common cause. Check withopensslor testssl.sh.Internal CA. Your clients trust your company root, the scanner does not. Our server with a full chain from an unknown CA got code 20. The finding is accurate for the scanner, and the fix is on the scanner side (section 4).
Scanned by IP address or another name. Our catch-all default server answered unknown names with a certificate for another host. With the right name the test passed; with another name it failed (62), and by IP address too (64). Check the address and the name in the report. 45411 usually appears next to 51192 in this case.
Wrong intermediate. After a CA changes intermediates, an old bundle can stay in the config. Our server sent the right leaf with another CA's intermediate and got code 21, the same as a missing one.
3. How serious it is for you
Our view: a missing intermediate on a public site is mostly an availability problem. Browsers work, so nobody notices, until a customer's integration, a mobile app or a monitoring probe refuses to connect. Fix it the same day; it is one file.
A self-signed or unknown-CA certificate on a public host is more serious: users and scripts learn to click through or turn off verification, and then a network attacker can impersonate the host. An expired certificate is an outage for most clients.
Accepted risk is reasonable for internal hosts that use your own CA, when every client trusts that CA. Write down which CA and which hosts, and load the root into the scanner so the report stays clean.
4. Fix it on your platform
The fix for a missing intermediate is to send it. The server certificate comes first, then the intermediates, and the root may be left out (RFC 8446 §4.4.2). Your CA or ACME client supplies the file: certbot's fullchain.pem holds the server certificate followed by the intermediates, and certbot says it is what nginx needs for ssl_certificate and what Apache 2.4.8 and later need for SSLCertificateFile (certbot).
nginx (lab-tested on 1.30.8)
ssl_certificate /etc/ssl/site/fullchain.pem;
ssl_certificate_key /etc/ssl/site/privkey.pem;
nginx's documentation says the server certificate "must appear before the chained certificates in the combined file" (nginx HTTPS servers). Run nginx -t to check the configuration (nginx command line), then reload nginx. In our lab, cert.pem alone failed with code 21 and fullchain.pem passed. Check every server block that listens on the port in the report, including the default server.
Apache httpd (lab-tested on 2.4.71)
SSLCertificateFile /etc/ssl/site/fullchain.pem
SSLCertificateKeyFile /etc/ssl/site/privkey.pem
Since 2.4.8 the certificate file may include the intermediates, sorted from leaf to root (mod_ssl SSLCertificateFile). The older SSLCertificateChainFile is deprecated, but in our lab a virtual host with it still passed. The same leaf without either failed with code 21. Run apachectl configtest before reloading (apachectl).
IIS (not run by us)
Run the openssl s_client check above against the IIS host after any certificate change.
Express and Node.js (lab-tested on Node.js 22)
https.createServer({ key: fs.readFileSync('/etc/ssl/site/privkey.pem'), cert: fs.readFileSync('/etc/ssl/site/fullchain.pem') }, handler)
Node.js expects the certificate "followed by the PEM formatted intermediate certificates (if any), in order, and not including the root CA" (Node.js tls.createSecureContext). Our server with cert.pem failed, with fullchain.pem it passed.
Cloudflare (from documentation, not run by us)
Cloudflare Origin CA certificates are trusted only by Cloudflare. Its documentation warns that visitors "may see untrusted certificate errors" if you pause Cloudflare or turn off proxying for a host that uses one (Cloudflare Origin CA). A scanner pointed at the origin IP address therefore reports 51192. Either scan the proxied host name, or treat the reachable origin as the real finding and accept connections there from Cloudflare only.
AWS (from documentation, not run by us)
When you import a certificate into ACM, the chain is a separate, optional field: "If the certificate is signed by a CA, and you choose to provide the certificate chain, the chain must be PEM–encoded" (ACM import). Fill it with the intermediates, then run the check against the load balancer.
Vercel and Netlify (not run by us)
Both platforms issue and serve certificates for you. Run the check against the host in the report.
Your own CA: load the root into the scanner (from vendor documentation, not run by us)
Tenable lets you pass your own root and intermediate certificates to the scan "so that this plugin does not trigger for internally trusted certificates": in Nessus under Settings > Custom CA, in Tenable Vulnerability Management under the scan's Settings > Advanced > Trusted CAs (Tenable, resolving 51192). In our lab, testssl.sh took the root with --add-ca root.pem, nuclei with the environment variable SSL_CERT_FILE=root.pem, and our test with CAFILE=root.pem.
5. What to tell the customer
Example wording, adapt to what is true.
Fixed (missing intermediate):
Thank you for the report. The server at app.example.com:443 sent its certificate without the intermediate certificate, so clients that do not cache intermediates could not verify it. It now sends the full chain. Attached is
openssl s_client -showcertsoutput from, before and after, showing the chain and Verify return code: 0 (ok).
Internal CA:
The certificate on internal.example.com is issued by our internal CA, which our clients trust and your scanner does not. Attached is the CA certificate; with it loaded as a trusted CA (Nessus: Settings > Custom CA), the plugin should no longer fire. The host is not reachable from the internet.
Scanned by IP address or another name:
Your scanner connected to
without our host name, and our server answered with its default certificate. For app.example.com the chain verifies (output attached, ). We have <removed the default listener, or given it a valid certificate> so that the IP address no longer serves a certificate for another name.
Evidence to attach: the openssl s_client output with the s: lines and the verify code, the date, and the IP address and name you tested.
6. Test: fails before the fix, passes after
Our script cert-trust.sh, run as sh cert-trust.sh host:port [name], makes one TLS handshake and checks the certificate the way a client with only root certificates would.
Pass rule, written before the run: exit 0 only when a certificate arrived,
opensslverified it against the trusted roots for the given name or IP address, and every certificate below the root in the verified chain was among those the server sent. Exit 1 for any verification error (missing intermediate, unknown CA, self-signed, expired, not yet valid, name or IP mismatch) and for a chain completed from the client's own store. Exit 2, not tested, for no connection, no answer within 10 seconds, no certificate (a plain-HTTP port, an SSH port), an unreadableCAFILE, a missing tool or output it cannot classify.Run it on your host:
sh cert-trust.sh app.example.com:443, which trusts your machine's root store. For an internal CA:CAFILE=internal-root.pem sh cert-trust.sh internal.example.com:443. Run it once per host name in the report, and once with the IP address if the scanner used one. IPv4 addresses are checked as addresses; IPv6 addresses are not supported and exit 2, so use a host name that resolves to one. It needs a POSIX shell, OpenSSL 3,timeout,grep,sed,head,tailandsort, and exits 2 if one is missing. We ran it with GNU tools (Debian) and with BusyBox (Alpine), with the same results. LibreSSL lacks some options it uses; it should then exit 2, but we did not try it.What the test cannot detect: revocation (no OCSP or CRL check), weak keys or signature algorithms beyond what this OpenSSL build rejects, a certificate that expires next week, different answers on other ports, other IP addresses or without SNI, and a trust store on your machine that differs from your customers'. If your machine's store holds an intermediate as a trusted root, the check cannot tell.
7. What we ran
Runs 1 to 6, 2026-11-28: nginx 1.30.8, Apache httpd 2.4.71, Node.js 22, OpenSSL 3.5.9 on both clients, a private lab CA generated for each run, images pinned by digest. Every test ran from a GNU and a BusyBox client with the same exit codes in all six runs, and once more with timeout, openssl or sort removed from PATH, which gave exit 2 each time.
| Target | Certificate | Our test | testssl.sh 3.2.5 chain of trust | nuclei 3.11.1 SSL templates |
|---|---|---|---|---|
| nginx 443 | fullchain.pem |
pass | OK | none |
| nginx 8443 | cert.pem, leaf only |
fail, 21 | NOT ok (chain incomplete) | none (false negative) |
| nginx 9443 | self-signed | fail, 18 | NOT ok (self signed) | self-signed-ssl |
| nginx 10443 | expired | fail, 10 | NOT ok (expired) | expired-ssl |
| nginx 11443 | other name | fail, 62 | OK; host name "does not match" | mismatched-ssl-certificate |
| nginx 12443 | unknown CA, root not sent | fail, 20 | NOT ok (chain incomplete) | none (false negative) |
| nginx 13443 | not yet valid | fail, 9 | NOT ok (not yet valid) | none (false negative) |
| nginx 14443 | catch-all: right name / another name / IP address | pass / fail, 62 / fail, 64 | not run | none / mismatched-ssl-certificate / not run |
| nginx 15443 | leaf with another CA's intermediate | fail, 21 | NOT ok (chain incomplete) | none (false negative) |
| nginx 16443 | unknown CA, root appended | fail, 19 | not run | untrusted-root-certificate |
| Apache 443 / 8443 / 9443 | full chain / leaf only / SSLCertificateChainFile |
pass / fail, 21 / pass | 8443: NOT ok (chain incomplete) | 8443: none |
| Node.js | cert.pem / fullchain.pem |
fail, 21 / pass | not run | not run |
| leaf-only nginx, client store holds the intermediate | fail (intermediate not sent) | not run | not run | |
plain HTTP port, a port that never answers, an SSH port, an unknown host, a missing CAFILE, an IPv6 address (runs 4 to 6) |
negative cases | not tested (exit 2) in all six | not run | not run |
The runs were done by Claude Opus 5.5 (agent) on an internal Docker network with no outside access. Expected results were written before run 1 and again before run 4. They are in the lab's results folder with the raw outputs, image digests and file hashes. A separate AI agent checked the claims and runs 1 to 3; runs 4 to 6 add only the IPv6 case and the recorded output in section 2.
Surprises kept on record:
The first start of the lab failed because nginx resolved its upstreams before the app containers existed, and a second start was stopped from outside the script. Both are kept as smoke folders; neither counted as a run.
testssl.sh reported the unknown CA (12443) as "chain incomplete", the same words as a missing intermediate. Its output cannot tell the two apart;
openssl s_client -showcertscan.nuclei reported nothing for a certificate that is not yet valid:
expired-sslchecks only the end date.openssl s_clientprintedVerify return code: 0 (ok)for a port that does not speak TLS. We found this while writing the test, in a development smoke run, and the test requires a received certificate because of it.testssl.sh flagged every lab certificate as expiring within 30 days. That comes from the 30-day lab certificates, not from the finding.
Sources
Primary records first. Record identifiers link from the facts box.
Scanner rules and tool documentation
- Tenable, Nessus plugin 51192, accessed 2026-11-28
- Tenable, Nessus plugin 57582, accessed 2026-11-28
- Tenable, Nessus plugin 15901, accessed 2026-11-28
- Tenable, Nessus plugin 45411, accessed 2026-11-28
- ProjectDiscovery, nuclei template untrusted-root-certificate.yaml at commit eb28249 (MIT), accessed 2026-11-28
- ProjectDiscovery, nuclei template self-signed-ssl.yaml at commit eb28249 (MIT), accessed 2026-11-28
- ProjectDiscovery, nuclei template expired-ssl.yaml at commit eb28249 (MIT), accessed 2026-11-28
- ProjectDiscovery, nuclei template mismatched-ssl-certificate.yaml at commit eb28249 (MIT), accessed 2026-11-28
- ProjectDiscovery, tlsx clients.go at v1.2.2 (MIT), accessed 2026-11-28
- testssl.sh at v3.2.5, accessed 2026-11-28
- PortSwigger, issue 0x01000100, accessed 2026-11-28
- Qualys, SSL Labs rating guide, accessed 2026-11-28
Standards and specifications
- IETF, RFC 8446, accessed 2026-11-28
Vendor documentation and statements
- Tenable, resolving plugin 51192, accessed 2026-11-28
- nginx, configuring HTTPS servers, accessed 2026-11-28
- nginx, command-line parameters, accessed 2026-11-28
- Apache httpd, mod_ssl, accessed 2026-11-28
- Apache httpd, apachectl, accessed 2026-11-28
- Node.js, tls, accessed 2026-11-28
- EFF, certbot user guide, accessed 2026-11-28
- Mozilla, preloading intermediate CA certificates into Firefox, accessed 2026-11-28
- Cloudflare, Origin CA certificates, accessed 2026-11-28
- AWS, ACM import prerequisites, accessed 2026-11-28
Our lab
- Our lab, arviser-labs at commit eff5333, scanner-findings-b2, accessed 2026-11-28
- Our test, cert-trust.sh, accessed 2026-11-28
- Our lab, runs 1 to 6 of 2026-11-28: raw outputs, image digests and file hashes, accessed 2026-11-28
Corrections
No corrections.
Report an error to contact@arviser.com.
How this page was made: Claude Opus 5.5, an AI model, built and ran the lab and wrote this page from the sources listed. A separate AI agent checked the claims and lab runs 1 to 3; runs 4 to 6 added one negative case and the recorded output in section 2. Vadim Nareyko approved the family template and the sample pages on 26 November 2026, from a summary in Russian. This page was not reviewed by Vadim Nareyko. On 28 November 2026 Vadim Nareyko decided that new pages in the family are published after the linters and an independent check, without that review.
Text and data on this page: CC BY 4.0. Code in our lab: MIT. Quoted third-party material keeps its own terms.