2026-11-18
1068 words
5 minutes
CVE-2026-19707: Pre-Auth RCE in Airlock Gateway WAF
Manuel Feifel, Marc Bollhalder
CVE-2026-19707
Critical
  • Affected Product: Airlock Gateway (8.5.2 and earlier, and 8.6.0)
  • Vulnerability Type: Exploitable heap-based buffer overflow / out-of-bounds write
  • Severity: Critical (CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H)
  • CVE: CVE-2026-19707 (https://www.cve.org/CVERecord?id=CVE-2026-19707)
  • Privileges Required: None
  • Configuration Requirement:
    • URL Encryption enabled (any mode other than NONE) together with Form Protection and Smart Form Value Protection enabled.
    • The attacker needs control over the returned HTML content (e.g. Up and Download functionality or control of backend in a shared cloud instance).
  • Fixed Version: 8.5.3 & 8.6.1

Summary#

Airlock Gateway is the reverse-proxy and Web Application Firewall of the Airlock Secure Access Hub. An RCE vulnerability was found inside the response processing:

Client traffic is terminated and inspected by the Security Gate (see overview diagram in Technical Details), which applies request- and response-side filtering before traffic is passed to the protected backend applications.

One of the response-side features is Form Protection with Smart Form Value Protection. When enabled, the Gateway parses HTML responses coming from the backend, extracts the forms and their input elements, and emits a hidden integrity field (_xprot) so that the subsequent client request can be validated against the form that was actually served. Parsing therefore happens on attacker-influenceable backend output.

While normalising form values, the parser resolves HTML character references. The decoder variant that allocates a fresh output buffer sizes that buffer from the length of the encoded input and then decodes without carrying any destination bound or remaining-capacity value into the copy loop. The implicit assumption is that decoding never grows a string. This holds true for essentially the entire entity table, since a character reference is normally longer than the character it represents.

However, there are two entries that break this assumption:

EntityEntity LengthDecoded BytesDecoded Length
≫⃒5 bytese2 89 ab e2 83 926 bytes
≪⃒5 bytese2 89 aa e2 83 926 bytes

Both are five-byte references whose UTF-8 replacement is six bytes long. Every occurrence therefore writes one byte more than was accounted for.

The result is a controllable, heap out-of-bounds write in an unauthenticated, remotely reachable code path. With sufficient control over the response HTML, the overflow can be placed directly in front of an SG3_FormProtection object and used to corrupt its virtual-function pointer for exploitation. GPT-5.6 SOL created a successful exploit on its own without any guidance.

Impact#

With full control of the backend HTML response, an unauthenticated attacker gains code execution as the sg worker on the Gateway. This gives access to all communication going through the Airlock Gateway. In managed or multi-tenant deployments this allows cross-tenant data access. This includes proxied traffic, configuration, credentials and access to other mappings.

With only limited influence on the response (for example, reflection into a fixed form), the impact is a remote heap out-of-bounds write and reliable termination of the security_gate worker, i.e. denial of service against the protected applications.

Disclosure Timeline#

DateEvent
2026-07-06Vulnerability identified in Airlock Gateway
2026-07-14Initial report sent to the vendor
2026-07-17Vendor acknowledged receipt, starts investigation
2026-07-20Vendor confirms validity of the vulnerability report
2026-08-19Identifier CVE-2026-19707 reserved by Airlock CNA
2026-10-01Fix versions 8.5.3 & 8.6.1 released by Airlock
2026-11-18Public disclosure / advisory published

Technical details#

This official system architecture diagram gives an overview of the virtual appliance. The main component with the largest attack surface is the Security Gate. The custom Apache module called mod_airlock has little functionality and forwards traffic to the security gate.

Configuration Requirement#

The vulnerable code inside the Security Gate is only triggered if certain protection features are enabled:

Mapping.<mapping>.UrlEncryption.Mode                     "SESSION"
Mapping.<mapping>.UrlEncryption.ThreatHandling           "BLOCK"
Mapping.<mapping>.ThreatHandling                         "BLOCK"
Mapping.<mapping>.FormProtection.Enable                  "TRUE"
Mapping.<mapping>.FormProtection.ValueProtection.Enable  "TRUE"

In the web GUI:

Root Cause#

While resolving character references, an output buffer is allocated that has the same size as the input buffer. While decoding the individual character references into the output buffer however, no length checks are performed and the resolved reference is just copied directly into the output buffer:

memcpy(dst, replacement.data(), replacement.size());
dst += replacement.size();

Since the output buffer length is never checked against the size of the replacement and current output buffer position, an attacker can control an overflow in both length and content.

The following values can be exploited:

EntityEntity LengthDecoded BytesDecoded Length
&nGt;5 bytese2 89 ab e2 83 926 bytes
&nLt;5 bytese2 89 aa e2 83 926 bytes

Exploitation for RCE#

Because the overflowing allocation is derived from a form value, the surrounding heap layout follows directly from the structure of the response HTML. By controlling element order and types, name lengths and value sizes across repeated responses, the decoder allocation can be groomed to sit immediately before an SG3_FormProtection object, so that the out-of-bounds bytes land on that object’s virtual-function pointer.

Two requests can be sent that use the corrupted object to leak a security_gate code pointer and a libc pointer back to the client through the hidden _xprot form field. This defeats PIE and ASLR. A follow-up request can then redirect an indirect call to libc system() with an attacker-controlled argument.

The exploit was fully created by GPT-5.6 SOL. GPT-5.5 and Opus 4.8 were both not able to exploit it on their own. The following screenshots show a successful exploitation which is very reliable:

Attack Surface and Realistic Scenarios#

Reaching the vulnerable code requires the parsed HTML response to contain an expanding character reference inside a protected input value. No authentication and no user interaction against the Gateway are needed, but the attacker must be able to influence the application response.

We have identified the following scenarios where this is applicable:

  • Managed cloud or shared reverse-proxy service: A provider operates Airlock as a managed WAF service where customers control their backend and can return arbitrary HTML, but the customers have no access to the WAF host itself.
  • Compromised origin: A backend under attacker control creates the same condition.
  • Arbitrary file upload and download: If crafted bytes can be stored and later retrieved through the affected mapping with the correct content-type header set, this provides equivalent response control. Uploading may only require a low-privilege account, and the attacker can trigger retrieval. However, this is heavily dependent on the application that is deployed behind the Airlock Gateway.

The Airlock Gateway selects the HTML parser from the response Content-Type header and not from the URL extension, the download filename, or Content-Disposition. A .txt file or an attachment response therefore reaches the vulnerable path if its content type is labelled text/html. Forms served as text/plain, application/octet-stream, or with no content type are not vulnerable under the default configuration.

Mitigation and Workaround#

It is recommended to upgrade to the latest version as soon as possible. If a new version can’t deployed right away, the exposure can be reduced by disabling Smart Form Value Protection (FormProtection.ValueProtection.Enable) on mappings whose backends are not fully trusted, and by ensuring that user-supplied content is never served back through such a mapping with a text/html content type.

CVE-2026-19707: Pre-Auth RCE in Airlock Gateway WAF
https://labs.infoguard.ch/advisories/cve-2026-19707_airlock-gateway_remote-code-execution/
Author
Manuel Feifel, Marc Bollhalder
Published at
2026-11-18