Reference material — not professional advice. Test in staging, back up first, verify against your specific version. Use your own judgment for your environment.
● Medium · CVSS 4.3 ⚠ ACTIVELY EXPLOITED — CISA KEV

How to Fix CVE-2018-13383: Out-of-bounds write in Fortinet FortiOS and FortiProxy

⚡ At a glance
Severity4.3 (Medium)
Actively exploited?Yes, listed in CISA KEV (added 2022-01-10)
AffectedFortinet FortiOS 6.0.0 through 6.0.4, 5.6.0 through 5.6.10, 5.4.0 through 5.4.12, 5.2.14 and earlier, FortiProxy 2.0.0, 1.2.8 and earlier
Fixed inSee vendor advisory
Type (CWE)CWE-787: Out-of-bounds Write
WARNING: This vulnerability is on the CISA Known Exploited Vulnerabilities catalog (added 2022-01-10). Federal civilian agencies must remediate by 2022-07-10. Treat it as active exploitation, not theoretical.

What is CVE-2018-13383?

A heap buffer overflow in Fortinet FortiOS 6.0.0 through 6.0.4, 5.6.0 through 5.6.10, 5.4.0 through 5.4.12, 5.2.14 and earlier and FortiProxy 2.0.0, 1.2.8 and earlier in the SSL VPN web portal may cause the SSL VPN web service termination for logged in users due to a failure to properly handle javascript href data when proxying webpages.

Am I affected?

From the device CLI, run the version check:


# Cisco IOS/IOS XE
show version | include Version

# FortiGate (FortiOS)
get system status

# Palo Alto (PAN-OS)
show system info | match sw-version

# Juniper (Junos)
show version

Compare what you see against the Affected row above (Fortinet FortiOS 6.0.0 through 6.0.4, 5.6.0 through 5.6.10, 5.4.0 through 5.4.12, 5.2.14 and earlier, FortiProxy 2.0.0, 1.2.8 and earlier). If your build sits inside that range, the device is exposed and should be upgraded.

How to fix CVE-2018-13383

The primary fix is to upgrade Fortinet FortiOS and FortiProxy to the patched build. Use the commands for your platform below; the patched version listed in the vendor advisory is: See vendor advisory.

FortiGate (FortiOS CLI)


# Vendor advisory: https://fortiguard.com/advisory/FG-IR-18-388
get system status              # confirm current version
execute backup config tftp <file> <tftp-server>
execute restore image tftp <patched-image>.out <tftp-server>
execute reboot

Complete operator runbook (network appliance)

Run this from your management workstation (Linux/macOS or Windows with a TFTP server reachable). It shells into the device, backs up the running config, transfers the patched image, and reloads.


# Vendor advisory: https://fortiguard.com/advisory/FG-IR-18-388
#!/usr/bin/env bash
# CVE-2018-13383 fix runbook for Fortinet Fortinet FortiOS and FortiProxy
# Target build: the patched build

set -euo pipefail
DEVICE="${1:?usage: $0 <device-ip> <patched-image-file> <tftp-server-ip>}"
IMAGE="${2:?patched image filename required}"
TFTP="${3:?tftp server ip required}"
LOG="/var/log/cve-2018-13383-$(date +%Y%m%d-%H%M%S).log"

echo "[1/4] Pulling current config from $DEVICE"
ssh admin@"$DEVICE" "show version" | tee -a "$LOG"
ssh admin@"$DEVICE" "copy running-config tftp://$TFTP/cve-2018-13383-pre.cfg"

echo "[2/4] Uploading patched image $IMAGE via TFTP"
ssh admin@"$DEVICE" "copy tftp://$TFTP/$IMAGE flash:$IMAGE" | tee -a "$LOG"

echo "[3/4] Setting boot image and reloading"
ssh admin@"$DEVICE" "configure terminal
 boot system flash:$IMAGE
 end
 write memory
 reload" | tee -a "$LOG"

echo "[4/4] Wait ~5 minutes, then verify"
sleep 300
ssh admin@"$DEVICE" "show version | include Version" | tee -a "$LOG"
echo "Compare reported version against the patched build"

If you can't patch immediately

If you cannot apply the patched version today, restrict exposure with one of the following runnable controls. None replace the patch.

Network restriction (Linux, nftables)


# Block inbound traffic to the affected service from untrusted networks
sudo nft add table inet filter
sudo nft 'add chain inet filter input { type filter hook input priority 0 ; }'
sudo nft 'add rule inet filter input tcp dport {443, 80} ip saddr != 10.0.0.0/8 drop'
sudo nft list ruleset

Network appliance ACL


# Cisco IOS example: restrict management plane to a trusted subnet
configure terminal
access-list 99 permit 10.0.0.0 0.255.255.255
line vty 0 15
 access-class 99 in
end
write memory

Service-level fallback


# If the affected feature is optional, stop the service until the patch is applied
sudo systemctl stop fortinet
sudo systemctl disable fortinet

How to verify the fix worked


# Linux
fortinet --version 2>/dev/null || dpkg -s fortinet | grep -i version
rpm -q fortinet 2>/dev/null || true

# Windows
winget list | findstr /I "fortinet"
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5

Expected: the reported version is at or above the patched build documented in the advisory. Restart any services that loaded the old library (systemctl restart <service> on Linux, restart the Windows service or reboot when prompted). For network appliances, run show version on the device and confirm the build matches the patched release.

Frequently asked questions

Other vulnerabilities in the same area that are worth patching alongside this one:

Is CVE-2018-13383 actually being exploited?

According to the data sources above, yes, CISA has it listed as actively exploited. Either way, the fix is the same: apply the vendor patch.

Do I need to reboot after patching?

For OS or kernel updates, yes. For most userland packages a systemctl restart <service> is enough. Any process that loaded the old shared library keeps using it until restarted, so when in doubt, reboot.

What is the CVSS score?

4.3 (medium). Refer to the vendor advisory for the exact vector string.

Where is the official advisory?

See the References section at the bottom of this page; the vendor's URL is the authoritative source for affected builds and patched versions.

References


*Written by Sai Kiran Pandrala. Assembled from the official vendor advisory, NVD record, and CISA KEV listing on 2026-05-25. Always confirm against the vendor's advisory before applying changes in production.*