diff --git a/mainline/alpine-perl/Dockerfile b/mainline/alpine-perl/Dockerfile
index 9a7bbe84b4a3dc416c90d85f4bdbee44b5e08fb8..2579b27cc5be490054e1cd14e3ea3da3d9388a95 100644
--- a/mainline/alpine-perl/Dockerfile
+++ b/mainline/alpine-perl/Dockerfile
@@ -2,7 +2,7 @@ FROM alpine:3.5
 
 LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
 
-ENV NGINX_VERSION 1.13.4
+ENV NGINX_VERSION 1.13.5
 
 RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
 	&& CONFIG="\
diff --git a/mainline/alpine/Dockerfile b/mainline/alpine/Dockerfile
index 4c2c1df7cde22c7f9d1b25a900a3c1587ebd1b65..fa6c012b24b9e04bcc4577506d4fa9b7137bfecb 100644
--- a/mainline/alpine/Dockerfile
+++ b/mainline/alpine/Dockerfile
@@ -2,7 +2,7 @@ FROM alpine:3.5
 
 LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
 
-ENV NGINX_VERSION 1.13.4
+ENV NGINX_VERSION 1.13.5
 
 RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
 	&& CONFIG="\
diff --git a/mainline/stretch-perl/Dockerfile b/mainline/stretch-perl/Dockerfile
index 9931429f8a91cbcceb7d8f2ae107030e18bc4cef..7860ae714c4114c0aedc045092b1397ad3e3322f 100644
--- a/mainline/stretch-perl/Dockerfile
+++ b/mainline/stretch-perl/Dockerfile
@@ -2,8 +2,8 @@ FROM debian:stretch-slim
 
 LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
 
-ENV NGINX_VERSION 1.13.4-1~stretch
-ENV NJS_VERSION   1.13.4.0.1.12-1~stretch
+ENV NGINX_VERSION 1.13.5-1~stretch
+ENV NJS_VERSION   1.13.5.0.1.13-1~stretch
 
 RUN set -x \
 	&& apt-get update \
diff --git a/mainline/stretch/Dockerfile b/mainline/stretch/Dockerfile
index 407d1ab931b1e63c4dc3bb4d8f8fbfc32693c06e..b39ab333ffb297ec85e6a0b1640d8223250b3b49 100644
--- a/mainline/stretch/Dockerfile
+++ b/mainline/stretch/Dockerfile
@@ -2,8 +2,8 @@ FROM debian:stretch-slim
 
 LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
 
-ENV NGINX_VERSION 1.13.4-1~stretch
-ENV NJS_VERSION   1.13.4.0.1.12-1~stretch
+ENV NGINX_VERSION 1.13.5-1~stretch
+ENV NJS_VERSION   1.13.5.0.1.13-1~stretch
 
 RUN set -x \
 	&& apt-get update \