EEF-CVE-2026-115747

Source
https://cna.erlef.org/osv/EEF-CVE-2026-115747.html
Import Source
https://cna.erlef.org/osv/EEF-CVE-2026-115747.json
JSON Data
https://api.osv.dev/v1/vulns/EEF-CVE-2026-115747
Aliases
  • GHSA-x527-4ww5-wwr5
  • CVE-2026-115747
Published
2026-11-24T15:29:06Z
Modified
2026-11-24T15:30:02Z
Severity
  • 5.9 (Medium) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N (Source: CNA) CVSS Calculator
Summary
AArch64 JIT register-cache bug allows VM denial of service via XML
Details

Summary

Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in the AArch64 JIT in Erlang OTP erts allows an attacker to crash the BEAM virtual machine via input that reaches a chained integer range guard, such as an oversized numeric character reference parsed by xmerl_sax_parser.

In erts/emulator/beam/jit/arm/instr_common.cpp, BeamModuleAssembler::emit_is_ge_lt wraps its generated code in preserve_cache and marks only TMP1 as clobbered. When the compared value is not a small integer, the generated code calls the shared fragment is_ge_lt_shared, which also overwrites ARG1 and other caller-saved registers. The register cache keeps stale entries, so later instructions may use a clobbered register as an Erlang term and the emulator dies with a segmentation fault. A reference such as � takes this path in the ?is_char guard of the SAX parser. Only AArch64 builds that run the JIT are affected. The x86-64 JIT and interpreter builds do not contain the faulty code.

This issue affects OTP from OTP 27.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to erts from 15.0 before 15.2.7.15, 16.4.0.8, and 17.1.2.

Details

1. Code generation. BeamModuleAssembler::emit_is_ge_lt in erts/emulator/beam/jit/arm/instr_common.cpp emits the is_ge_lt instruction, which the compiler produces for a chained guard of the form A =< X, X < B. The AArch64 emitter wraps the whole sequence in preserve_cache and declares TMP1 as the only clobbered register, so the register cache keeps its entries across the instruction.

2. Generic path. When the operand is not a small integer, the generated code loads it into ARG1 and calls the global fragment BeamGlobalAssembler::emit_is_ge_lt_shared. The fragment performs a generic term comparison and overwrites ARG1 and other caller-saved registers.

3. Stale cache. The cache still records ARG1 as holding a copy of a BEAM Y register. A later instruction that needs that Y register reuses ARG1 instead of reloading it from the stack, and so operates on whatever the fragment left behind.

4. Crash. The leftover value is treated as a tagged Erlang term. When it is dereferenced as a boxed term, the emulator reads an invalid address and dies with SIGSEGV. The whole node terminates without a crash dump.

5. Trigger. The ?is_char guard in lib/xmerl/src/xmerl_sax_parser_base.erlsrc compares a decoded numeric character reference against several ranges in sequence. A value that does not fit a small integer on a 64-bit runtime, for example &#576460752303423488; (2^59), takes the generic path. The expected outcome is a fatal_error naming an illegal character.

The fix removes the preserve_cache wrapper so the cache is invalidated after the instruction, matching emit_is_in_range. The x86-64 emitter never preserved the cache here.

Proof of concept

  1. Run an AArch64 build of OTP 27 or later with the JIT enabled; erlang:system_info(emu_flavor) returns jit.
  2. Parse an XML document that contains a numeric character reference too large for a small integer, for example <a>&#576460752303423488;</a>, with xmerl_sax_parser:stream/2 or xmerl_sax_parser:file/2. No entity expansion or external resource is needed.
  3. The emulator exits with SIGSEGV (status 139) instead of returning {fatal_error, _, "Not a legal character: #576460752303423488", _, _}.

Impact

An attacker who can get an affected AArch64 node to parse crafted XML, or to run other code that compiles to the same comparison sequence over a non-small integer, terminates the whole BEAM VM, including every unrelated application on it. Supervision cannot contain a native crash. Code execution, information disclosure and data modification have not been demonstrated.

Workarounds

On AArch64 hosts, run the emulator without the JIT: start it with erl -emu_flavor emu when the interpreter flavor is installed, or build OTP with --disable-jit. The interpreter does not execute the affected generated code.

Configurations

Only AArch64 (ARM64) runtimes that execute the JIT are affected; erlang:system_info(emu_flavor) returns jit on such a node. The x86-64 JIT, interpreter builds (emu flavor) and 32-bit platforms do not run the affected code. The demonstrated path requires an application to pass attacker-controlled XML to xmerl_sax_parser, but other Erlang code that compiles to the same chained range guard over a non-small integer can reach the same defect.

Database specific
{
    "capec_ids":  [
        "CAPEC-129"
    ],
    "cpe_ids":  [
        "cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"
    ],
    "cwe_ids":  [
        "CWE-119"
    ]
}
References
Credits
    • Felix Jankowski / Jankowski Engineering GmbH - FINDER
    • IlYoung - FINDER
    • Felix Jankowski / Jankowski Engineering GmbH - REPORTER
    • IlYoung - REPORTER
    • Jonatan Männchen / EEF - COORDINATOR
    • Felix Jankowski / Jankowski Engineering GmbH - REMEDIATION_DEVELOPER
    • Josué Olmos - REMEDIATION_REVIEWER

Affected packages

Git / github.com/erlang/otp

Database specific

source
"https://cna.erlef.org/osv/EEF-CVE-2026-115747.json"