This is a nick in the spare key hanging in the server room, not a broken front-door lock
CVE-2023-31122 is an out-of-bounds read in Apache HTTP Server's mod_macro, affecting upstream Apache httpd through 2.4.57 and fixed in 2.4.58. mod_macro is a configuration macro-expansion module: Apache's own docs say macros are expanded *when the server starts up*, so this bug lives in config parsing rather than normal request handling. If mod_macro is not loaded, this CVE does not apply.
The vendor-vs-reality gap is wide here. NVD scored it 7.5/HIGH with a generic network-DoS vector, but Apache itself labeled it low, and that is much closer to operational truth: an attacker usually needs more than raw HTTP reachability to matter here, because they must get Apache to parse attacker-controlled macro content in config or .htaccess-like paths first. For most enterprises, that means this is post-compromise or tenant-misconfiguration territory, not a clean unauthenticated internet exploit.
4 steps from start to impact.
Find old Apache versions with Nessus or banner scans
mod_macro is loaded or whether the vulnerable parsing path is attacker-reachable.- Apache httpd version through 2.4.57
- Some form of version disclosure or package visibility
- Version-only detection overstates exposure because the CVE is in
mod_macro, not the core request path - Backported distro fixes and hidden banners reduce accuracy
mod_macro is loaded.Confirm mod_macro is actually loaded
mod_macro, so the next step is verifying that the module is enabled in the live Apache runtime or reachable configuration set. Apache's module documentation makes clear this component exists to expand macros inside configuration files, not to process ordinary web requests.mod_macroloaded in Apache- Access to runtime module list, package metadata, or config files
- External attackers usually cannot tell whether
mod_macrois enabled - Many enterprises never use
mod_macroat all
apachectl -M, httpd -M, config review) work well; network scanners generally cannot validate module presence.Reach a config parsing path with attacker-controlled macro content
.htaccess-style file where overrides are allowed and later parsed.- Ability to write or influence Apache configuration content
- Apache parsing event such as restart, reload, or request-time
.htaccesshandling
- This is not a plain HTTP request bug
- Requiring config write or equivalent strongly implies prior compromise, delegated admin, or risky shared-hosting design
- Modern EDR/FIM/privilege controls should catch config tampering first
Crash or over-read inside Apache process
A:H and no integrity/confidentiality impact. There is no authoritative evidence here of clean pre-auth remote code execution or broad in-the-wild weaponization.- Successful parser trigger in vulnerable
mod_macrocode - Apache process handling the crafted macro input
- Impact is limited versus code-exec-class server bugs
- Requires several narrowing prerequisites before the bug even matters
The supporting signals.
| In-the-wild status | No public evidence of active exploitation found. CISA's Vulnrichment record shows Exploitation: none, and the CVE is not listed in the CISA KEV catalog page reviewed. |
|---|---|
| Proof-of-concept availability | No authoritative public PoC stood out. Search noise exists in aggregator sites, but I did not find a trusted Apache-authored reproducer or a widely cited offensive PoC worth treating as operationally significant. |
| EPSS | Bitsight currently displays EPSS 0.4 at the 61st percentile for CVE-2023-31122; treat that as modest signal, not proof of imminent exploitation. |
| KEV status | Not in CISA KEV based on the CISA KEV catalog page reviewed; no federal due date applies. |
| CVSS | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H = 7.5/HIGH at NVD, but that vector assumes internet reachability that the real attack chain does not cleanly support. |
| Affected range | Upstream Apache HTTP Server through 2.4.57; Apache describes it as mod_macro only. |
| Fixed versions | Upstream fix is 2.4.58. Debian LTS backported fixes in 2.4.59-1~deb10u1 for Debian 10 apache2. |
| Exposure reality | Bitsight shows 246,814 public observations of Apache 2.4.57 and 5,499,646 observations tied to the CVE, but those are internet-scale version observations and do not prove mod_macro is enabled. |
| Disclosure timeline | Apache released 2.4.58 on 2023-10-19 and NVD published the CVE on 2023-10-23. Openwall lists the report timeline as 2023-04-04 to Apache security. |
| Reporter | Reported by David Shoon (github/davidshoon) per Apache/Openwall. |
noisgate verdict.
The decisive factor is attacker position: this bug is in a configuration macro parser, so real exploitation usually requires config influence or another foothold before Apache ever touches malicious input. That sharply cuts the exposed population compared with a true request-path Apache bug, so a LOW rating is the right operational bucket.
Why this verdict
- Config-parser, not request-parser: Apache documents
mod_macroexpansion at startup/config processing time, which breaks the usual 'send one HTTP request from the internet' assumption behind the 7.5 score. - Requires narrower attacker position: to matter in real life, the attacker typically needs config write/influence,
.htaccesscontrol, or equivalent delegated admin access. That implies post-initial-access or a special hosting model, which is strong downward pressure on severity. - Population is much smaller than Apache-at-large: internet scanning can find old Apache versions, but it generally cannot prove
mod_macrois enabled. That makes the truly reachable population much smaller than the visible banner population.
Why not higher?
There is no solid evidence here of unauthenticated remote code execution, no KEV listing, and no trustworthy sign of broad exploitation campaigns. The biggest reason not to go higher is that raw network access to port 80/443 is usually insufficient by itself.
Why not lower?
It is still a real memory-safety bug in a widely deployed product family, and some environments do let untrusted users influence Apache config fragments or .htaccess. If you run shared hosting, delegated web content management, or permissive override models, the risk is non-zero and worth cleaning up.
What to do — in priority order.
- Inventory
mod_macrousage — Identify which Apache nodes actually loadmacro_moduleand document where macros are used. For a LOW verdict there is no SLA (treat as backlog hygiene), but do this in the next routine audit so you can sharply reduce false-positive exposure. - Lock down config write paths — Restrict write access to Apache configs, included snippets, and web roots that can carry
.htaccessfiles; alert on drift with FIM or EDR. For a LOW verdict there is no SLA (treat as backlog hygiene), but this control matters more than rushing a fleet-wide emergency patch. - Reduce override usage — Where possible, disable or narrowly scope
AllowOverrideso untrusted content paths cannot introduce Apache directives that must be parsed at request time. For a LOW verdict there is no SLA (treat as backlog hygiene) and this is mainly about shrinking reachability.
- A generic WAF does not solve this well, because the bug is not primarily a normal request-routing flaw in Apache's front-door traffic path.
- Internet-facing banner hiding does not materially reduce risk; it only makes scanner output noisier without removing the underlying config-parser condition.
- Treating every Apache
<2.4.58host as equally urgent does not work, because many won't havemod_macroenabled and some distros backport fixes.
Crowdsourced verification payload.
Run this on the target Apache host as a local administrator or with sudo, because it reads runtime module state and package metadata. Example: sudo bash check_cve_2023_31122.sh; it needs enough privilege to run apachectl -M/httpd -M and query the package manager.
#!/usr/bin/env bash
# check_cve_2023_31122.sh
# Determine likely exposure to CVE-2023-31122 (Apache mod_macro buffer over-read)
# Output: VULNERABLE / PATCHED / UNKNOWN
# Exit codes: 0=PATCHED, 1=VULNERABLE, 2=UNKNOWN
set -u
fixed_upstream="2.4.58"
status="UNKNOWN"
reason=""
ctl=""
mod_output=""
server_version=""
pkg_info=""
have_cmd() { command -v "$1" >/dev/null 2>&1; }
ver_ge() {
# returns 0 if $1 >= $2
[ "$(printf '%s\n%s\n' "$2" "$1" | sort -V | head -n1)" = "$2" ]
}
find_ctl() {
for c in apache2ctl apachectl httpd; do
if have_cmd "$c"; then
ctl="$c"
return 0
fi
done
return 1
}
get_server_version() {
local out=""
if [ -n "$ctl" ]; then
out="$($ctl -v 2>/dev/null || true)"
server_version="$(printf '%s' "$out" | sed -n 's/.*Apache\/\([0-9][0-9.]*\).*/\1/p' | head -n1)"
fi
}
get_module_list() {
if [ -n "$ctl" ]; then
mod_output="$($ctl -M 2>/dev/null || true)"
fi
}
get_pkg_info() {
if have_cmd dpkg-query; then
pkg_info="$(dpkg-query -W -f='${Package} ${Version}\n' apache2 apache2-bin 2>/dev/null || true)"
elif have_cmd rpm; then
pkg_info="$(rpm -q httpd apache2 2>/dev/null || true)"
fi
}
package_has_fixed_backport() {
# Known fixed Debian LTS package from advisory
printf '%s\n' "$pkg_info" | grep -Eq 'apache2(\-bin)? 2\.4\.59-1~deb10u1' && return 0
return 1
}
main() {
find_ctl || true
get_server_version
get_module_list
get_pkg_info
if package_has_fixed_backport; then
echo "PATCHED - package backport detected ($pkg_info)"
exit 0
fi
if [ -z "$mod_output" ]; then
echo "UNKNOWN - could not retrieve loaded Apache modules"
exit 2
fi
if ! printf '%s\n' "$mod_output" | grep -Eq 'macro_module'; then
echo "PATCHED - mod_macro is not loaded, CVE-2023-31122 does not apply"
exit 0
fi
if [ -z "$server_version" ]; then
echo "UNKNOWN - mod_macro is loaded but Apache version could not be determined"
exit 2
fi
if ver_ge "$server_version" "$fixed_upstream"; then
echo "PATCHED - Apache $server_version with mod_macro loaded is at or above $fixed_upstream"
exit 0
fi
echo "VULNERABLE - Apache $server_version is below $fixed_upstream and mod_macro is loaded"
exit 1
}
main "$@"
If you remember one thing.
mod_macro; if they do not, close or downgrade the finding. For the remainder, fold patching into normal maintenance: for a LOW verdict there is no noisgate mitigation SLA and noisgate remediation SLA is no SLA (treat as backlog hygiene). If you discover shared-hosting, delegated .htaccess, or config-write workflows that let untrusted users influence Apache directives, tighten those controls in the same maintenance cycle and patch the affected subset in routine change windows.Sources
- Apache HTTP Server 2.4 vulnerabilities
- NVD CVE-2023-31122
- Openwall oss-security post for CVE-2023-31122
- Apache mod_macro documentation
- Debian LTS advisory DLA-3818-1
- CISA Known Exploited Vulnerabilities Catalog
- Bitsight CVE-2023-31122 observation footprint
- Bitsight Apache HTTP Server 2.4.57 observation footprint
What defenders are saying.
Crowdsourced verification outputs.
Results submitted by users who ran the verification payload against their environment.