diff --git a/.firefox.metadata b/.firefox.metadata
index 639d9d0..3513423 100644
--- a/.firefox.metadata
+++ b/.firefox.metadata
@@ -1,6 +1,6 @@
 511960dd78451a06c9df76509635aeec05b2051a SOURCES/Python-2.7.8.tgz
 467bdb846d67c01aed9e521fe0ef280065a50c3c SOURCES/devtoolset-2-binutils-2.23.52.0.1-10.el5.src.rpm
-10c9b836167b3d1dc500decd6e324adfebd6f854 SOURCES/firefox-52.3.0esr.source.tar.xz
-6b9a93948f31a086b9c5096e9ac01ec6283e6d13 SOURCES/firefox-langpacks-52.3.0esr-20170803.tar.xz
+7bee2816b89ffa06cbae3b146d98ba51a3c45da9 SOURCES/firefox-52.4.0esr.source.tar.xz
+72669ac177be8e245118dea2d0795779c5bc66fc SOURCES/firefox-langpacks-52.4.0esr-20170925.tar.xz
 e5ba84786af5d0e0e23b1a9112c76821ef23306c SOURCES/gcc48-4.8.2-16.el5.src.rpm
 77fd30f7ebc12a629a31c1e252cec06af55a71fe SOURCES/yasm-1.2.0-3.el5.src.rpm
diff --git a/.gitignore b/.gitignore
index b3a4b9a..ac621fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
 SOURCES/Python-2.7.8.tgz
 SOURCES/devtoolset-2-binutils-2.23.52.0.1-10.el5.src.rpm
-SOURCES/firefox-52.3.0esr.source.tar.xz
-SOURCES/firefox-langpacks-52.3.0esr-20170803.tar.xz
+SOURCES/firefox-52.4.0esr.source.tar.xz
+SOURCES/firefox-langpacks-52.4.0esr-20170925.tar.xz
 SOURCES/gcc48-4.8.2-16.el5.src.rpm
 SOURCES/yasm-1.2.0-3.el5.src.rpm
diff --git a/SOURCES/build-nss-version.patch b/SOURCES/build-nss-version.patch
index 30b670b..42f375d 100644
--- a/SOURCES/build-nss-version.patch
+++ b/SOURCES/build-nss-version.patch
@@ -5,7 +5,7 @@ diff -up firefox-52.0esr/old-configure.in.nss-ver firefox-52.0esr/old-configure.
      _USE_SYSTEM_NSS=1 )
  
  if test -n "$_USE_SYSTEM_NSS"; then
--    AM_PATH_NSS(3.28.5, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
+-    AM_PATH_NSS(3.28.6, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
 +    AM_PATH_NSS(3.28.4, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
  fi
  
diff --git a/SOURCES/firefox-centos-default-prefs.js b/SOURCES/firefox-centos-default-prefs.js
deleted file mode 100644
index fd3108f..0000000
--- a/SOURCES/firefox-centos-default-prefs.js
+++ /dev/null
@@ -1,27 +0,0 @@
-pref("app.update.auto",                     false);
-pref("app.update.enabled",                  false);
-pref("app.update.autoInstallEnabled",       false);
-pref("browser.backspace_action",            2);
-pref("browser.display.use_system_colors",   true);
-pref("browser.download.folderList",         1);
-pref("browser.link.open_external",          3);
-pref("browser.shell.checkDefaultBrowser",   false);
-pref("general.smoothScroll",                true);
-pref("general.useragent.vendor",            "CentOS");
-pref("general.useragent.vendorSub",         "FIREFOX_RPM_VR");
-pref("intl.locale.matchOS",                 true);
-pref("storage.nfs_filesystem",              false);
-pref("dom.ipc.plugins.enabled.nswrapper*",  false);
-pref("network.manage-offline-status",       true);
-pref("toolkit.networkmanager.disable",      false);
-pref("browser.startup.homepage",            "data:text/plain,browser.startup.homepage=file:///usr/share/doc/HTML/index.html");
-pref("toolkit.storage.synchronous",         0);
-pref("startup.homepage_override_url",       "http://www.centos.org");
-pref("startup.homepage_welcome_url",        "http://www.centos.org");
-pref("extensions.shownSelectionUI",         true);
-/* Workaround for rhbz#1110291 */
-pref("network.negotiate-auth.allow-insecure-ntlm-v1", true);
-/* Workaround for mozbz#1063315 */
-pref("security.use_mozillapkix_verification", false);
-pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
-pref("browser.tabs.remote.autostart",       false);
diff --git a/SPECS/firefox.spec b/SPECS/firefox.spec
index ea5aabf..ceb177a 100644
--- a/SPECS/firefox.spec
+++ b/SPECS/firefox.spec
@@ -1,6 +1,6 @@
 %define system_nss              1
 %global nspr_version            4.13.1
-%global nss_version             3.28.4
+%global nss_version             3.28.4-11
 %define system_sqlite           0
 %define sqlite_version          3.8.4.2
 %define system_ffi              1
@@ -76,8 +76,8 @@
 
 Summary:        Mozilla Firefox Web browser
 Name:           firefox
-Version:        52.3.0
-Release:        2%{?dist}
+Version:        52.4.0
+Release:        1%{?dist}
 URL:            http://www.mozilla.org/projects/firefox/
 License:        MPLv1.1 or GPLv2+ or LGPLv2+
 Group:          Applications/Internet
@@ -88,10 +88,10 @@ Group:          Applications/Internet
 # From ftp://archive.mozilla.org/pub/firefox/releases/%{version}%{?ext_version}/source
 Source0:        firefox-%{version}%{?ext_version}.source.tar.xz
 %if %{build_langpacks}
-Source1:        firefox-langpacks-%{version}%{?ext_version}-20170803.tar.xz
+Source1:        firefox-langpacks-%{version}%{?ext_version}-20170925.tar.xz
 %endif
 Source10:       firefox-mozconfig
-Source12:       firefox-centos-default-prefs.js
+Source12:       firefox-redhat-default-prefs.js
 Source20:       firefox.desktop
 Source600:      firefox.sh.in.rhel6
 Source700:      firefox.sh.in.rhel7
@@ -885,11 +885,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 #---------------------------------------------------------------------
 
 %changelog
-* Wed Aug 23 2017 Johnny Hughes <johnny@centos.org> - 52.3.0-2
-- Manual Debranding after Auto Debranding failed.
+* Mon Sep 25 2017 Jan Horak <jhorak@redhat.com> - 52.4.0-1
+- Update to 52.4.0 ESR
 
-* Thu Aug  3 2017 Jan Horak <jhorak@redhat.com> - 52.3.0-2
+* Thu Aug  3 2017 Jan Horak <jhorak@redhat.com> - 52.3.0-3
 - Update to 52.3.0 ESR (b2)
+- Require correct nss version
 
 * Tue Jun 13 2017 Jan Horak <jhorak@redhat.com> - 52.2.0-1
 - Update to 52.2.0 ESR