CVE-2026-137898: invisible to SSH banners

CVE-2026-137898: invisible to SSH banners

A ZoomEye query for SSH services returned 171,951,693 matches on November 27. Not one of those records can tell you whether the machine behind it is exposed to CVE-2026-137898, the PAM privilege escalation Red Hat rated Important the same day. Scanners count network state. This vulnerability lives in build flags and in where an administrator happened to stand when they ran a privileged command. The distance between those two facts is where patch programs go wrong.

Counting services is not counting exposure.

What CVE-2026-137898 requires

Start with the mechanics. The flaw sits in the PAM configuration handler that gets built when Linux-PAM is compiled against libeconf, the small library that splits configuration between a vendor directory under /usr/etc and the administrator’s own directory under /etc. When the vendor side of that split is left unconfigured, the handler misreads its search path and ends up treating a directory relative to the process’s current working directory as a configuration source. A user who can write to that directory can then feed the PAM stack a file of their own choosing.

The build condition is only the first gate. A low-privilege user drops a crafted environment configuration into a world-writable directory such as /tmp. Later, an administrator runs a privileged command from that directory, the PAM stack fires, and the handler loads the attacker’s file. Red Hat scores the issue Important with a CVSS 3.1 base score of 7.3. Build flags, an empty vendor directory, and a person standing in the wrong directory when they typed sudo all have to line up at once. Remove any one of them and the attack produces nothing.

Two identical banners, one vulnerable host

Two servers can report the same OpenSSH 9.3 banner, run the same distro release, and sit in the same subnet while one links libeconf into PAM and the other does not. The banner describes sshd. The vulnerability lives in a library that sshd only touches when its PAM stack runs. Build-time decisions of that kind never appear on the wire. Version fingerprinting has always been best effort, and build-dependent CVEs are the class where it fails without leaving a trace.

None of this is a new failure mode. Compliance scanners have matched CPE strings from banners for two decades, and the practice survived because most CVEs were version-gated and the match mostly worked. A build-dependent vulnerability breaks the comparison at a layer the wire never exposes. When the vulnerable condition is a compile flag, a packaging decision, or the state of a directory, the scanner’s version string is not incomplete. It is answering a different question.

The affected-build list has a twist. Standard Red Hat Enterprise Linux releases are not affected. Red Hat Hardened Images are listed in the CVE record. The hardened artifact is the vulnerable one, because that product line is where the libeconf integration landed. An asset database that reduces a host to ‘RHEL, patched’ can be wrong in both directions on the same day.

A banner is network state. Exposure is a build artifact. No packet ever carries link-time decisions, and that mismatch is why scan-built inventories keep answering the wrong question.

What the 171 million SSH count measured

The number deserves its own paragraph, because the specificity is the only honest part of it. On 2026-11-27 at 23:44 UTC, the measurement write-up ran the query service=”ssh” with sub_type=all against ZoomEye and received 171,951,693 matching services. That is an indexed service count. It is not a host census, since one machine with SSH listening on three ports appears three times. It says nothing about PAM, since PAM also runs on hosts that never expose port 22. And it cannot be a remediation queue, because no field in the response records libeconf, the vendor directory state, or anything else this CVE requires.

The count feels tempting anyway, and the temptation has a real basis. A local privilege escalation matters most on multi-user machines, and multi-user machines are overwhelmingly SSH hosts. So the 171.9 million is an upper bound on where the CVE could matter. It is only an upper bound, and it fails completely as change detection: run the same query monthly and the number moves with internet weather, not with anyone’s patching. Bug counts fail the same way. The recent OpenAI kernel audit produced 948 bugs and 304 reports, which measures review effort rather than a single exploitable host.

An inventory that can answer build questions

What would a defensible answer look like? Not a bigger scan. The records that decide this question describe how each machine was made: which image it boots, which package manifest it installs from, whether its PAM build links libeconf, and what its vendor directories contain. A software bill of materials helps exactly here, if it records the build and not just the package list. Custom images, hardened images, appliances, and rebuilds deserve the first look because they drift farthest from the distribution package. Breach scoping runs on the same discipline. The 1Password breach write-up separated what leaked from what didn’t, and an affected-host list is the same separation applied to builds instead of secrets.

  • Which OS image each host boots, and when that image was last built
  • Package manifests for every host that runs a PAM stack
  • Whether the PAM build on that image links libeconf
  • The state of every vendor directory the handler reads
  • Vendor advisories, read as build records rather than version numbers

For the libeconf question specifically, a linkage check is the fastest heuristic I know:

ldd /usr/lib64/security/pam_*.so 2>/dev/null | grep -B2 libeconf

On a stock RHEL host with no libeconf anywhere in the picture, the command prints nothing, and nothing is the answer. A printed module path puts the host in the review set, with the CVE record as the final word rather than this one-liner. I would treat any hit as a finding to verify, not a verdict. Heuristics that name files are cheap to run and cheap to defend. Banners were never either.

Working-directory discipline until the patch lands

The patch is the fix, and how slowly fixes reach builds is a measured problem; the Ubuntu kernel patch delay measurements showed real lag in a pipeline far more people watch. Until the PAM fix lands on each affected image, the residual risk is behavioral, and behavior can be constrained today. sudo, su, and sshd with UsePAM all traverse the stack, so the trigger command does not have to be exotic. Don’t run privileged commands from world-writable directories, starting with the obvious ones like /tmp and /var/tmp. Restrict which paths in the administrative workflow can be world-writable at all. Pin the working directory in policy where the tooling allows it: sudo has supported a CWD tag since 1.9.4, so a rule can bind a command to a fixed directory no matter where the caller stood.

Run the linkage check on the oldest custom image you own today. If it prints a path, that is one host no scanner was ever going to mention, and you now know something the 171,951,693-row count never will.

Press ⌘K to search & switch themes