diff --git a/bash-5.2-pipeline-exec.patch b/bash-5.2-pipeline-exec.patch
new file mode 100644
index 0000000..ba14696
--- /dev/null
+++ b/bash-5.2-pipeline-exec.patch
@@ -0,0 +1,15 @@
+diff --git a/execute_cmd.c b/execute_cmd.c
+--- a/execute_cmd.c
++++ b/execute_cmd.c
+@@ -5496,11 +5496,7 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
+     {
+       /* If we're optimizing out the fork (implicit `exec'), decrement the
+ 	 shell level like `exec' would do. */
+-#if 0 /* TAG: bash-5.2 psmith 10/11/2020 */
+       if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE && (subshell_environment & SUBSHELL_PIPE) == 0)
+-#else
+-      if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE)
+-#endif
+ 	adjust_shell_level (-1);
+ 
+       maybe_make_export_env ();
diff --git a/bash.spec b/bash.spec
index 1b991d8..b3ab1c3 100644
--- a/bash.spec
+++ b/bash.spec
@@ -6,7 +6,7 @@
 Version: %{baseversion}%{patchleveltag}
 Name: bash
 Summary: The GNU Bourne Again shell
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: GPLv3+
 Url: https://www.gnu.org/software/bash
 Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz
@@ -97,6 +97,9 @@ Patch131: bash-4.3-audit.patch
 # Fix an issue with adding newline in bracketed paste mode
 Patch132: bash-5.2-add-newline.patch
 
+# RHEL-20020 - Fix a performance regression while using large number of environment variables
+Patch133: bash-5.2-pipeline-exec.patch
+
 BuildRequires:  gcc
 BuildRequires: texinfo bison
 BuildRequires: ncurses-devel
@@ -329,6 +332,10 @@ end
 %{_libdir}/pkgconfig/%{name}.pc
 
 %changelog
+* Tue Feb 13 2024 Siteshwar Vashisht <svashisht@redhat.com> - 5.1.8-9
+- Fix a performance regression while using large number of environment variables
+  Resolves: RHEL-20020
+
 * Mon Feb 12 2024 Siteshwar Vashisht <svashisht@redhat.com> - 5.1.8-8
 - Fix an issue with adding newline in bracketed paste mode
   Resolves: #2168963