diff --git a/libio/Makefile b/libio/Makefile
index 08e1e0ec..acb578db 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -43,7 +43,7 @@ routines	:=							      \
 									      \
 	clearerr feof ferror fileno fputc freopen fseek getc getchar	      \
 	memstream pclose putc putchar rewind setbuf setlinebuf vasprintf      \
-	iovdprintf vscanf vsnprintf obprintf fcloseall fseeko ftello	      \
+	vaprintf iovdprintf vscanf vsnprintf obprintf fcloseall fseeko ftello \
 	freopen64 fseeko64 ftello64					      \
 									      \
 	__fbufsize __freading __fwriting __freadable __fwritable __flbf	      \
@@ -63,6 +63,7 @@ routines_no_fortify += \
   iovdprintf \
   swprintf \
   vasprintf \
+  vaprintf \
   vsnprintf \
   vswprintf \
   vwprintf \
diff --git a/libio/stdio.h b/libio/stdio.h
index 3bf6a1f6..3db363f1 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -410,6 +410,14 @@ extern int __asprintf (char **__restrict __ptr,
 extern int asprintf (char **__restrict __ptr,
 		     const char *__restrict __fmt, ...)
      __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
+
+/* Write formatted output to a string dynamically allocated with `malloc'.  */
+extern char *vaprintf (const char *__restrict __f, __gnuc_va_list __arg)
+     __THROWNL __attribute__ ((__format__ (__printf__, 1, 0)))
+     __attribute_malloc__;
+extern char *aprintf (const char *__restrict __fmt, ...)
+     __THROWNL __attribute__ ((__format__ (__printf__, 1, 2)))
+     __attribute_malloc__;
 #endif
 
 #ifdef __USE_XOPEN2K8
diff --git a/libio/vaprintf.c b/libio/vaprintf.c
new file mode 100644
index 00000000..6789052f
--- /dev/null
+++ b/libio/vaprintf.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2026 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.
+
+   As a special exception, if you link the code in this file with
+   files compiled with a GNU compiler to produce an executable,
+   that does not cause the resulting executable to be covered by
+   the GNU Lesser General Public License.  This exception does not
+   however invalidate any other reasons why the executable file
+   might be covered by the GNU Lesser General Public License.
+   This exception applies to code released by its copyright holders
+   in files containing the exception.  */
+
+#include <libioP.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdio.h>
+
+char *
+__vaprintf (const char *fmt, va_list args)
+{
+  char *p;
+
+  return __vasprintf_internal (&p, fmt, args, 0) < 0 ? NULL : p;
+}
+ldbl_weak_alias (__vaprintf, vaprintf)
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index 21094483..ec52c1ea 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -90,6 +90,7 @@ routines := \
   _itoa \
   _itowa \
   asprintf \
+  aprintf \
   ctermid \
   cuserid \
   dprintf \
@@ -178,6 +179,7 @@ routines := \
 # Exclude fortified routines from being built with _FORTIFY_SOURCE
 routines_no_fortify += \
   asprintf \
+  aprintf \
   dprintf \
   fprintf \
   printf \
diff --git a/stdio-common/aprintf.c b/stdio-common/aprintf.c
new file mode 100644
index 00000000..f2d0dbb2
--- /dev/null
+++ b/stdio-common/aprintf.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 2026 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <libioP.h>
+
+/* Write formatted output from FORMAT to a string which is
+   allocated with malloc.  */
+/* VARARGS1 */
+char *
+___aprintf (const char *fmt, ...)
+{
+  char *p;
+  va_list ap;
+
+  va_start (ap, fmt);
+  if (__vasprintf_internal (&p, fmt, ap, 0) < 0)
+    p = NULL;
+  va_end (ap);
+
+  return p;
+}
+ldbl_hidden_def (__aprintf, aprintf)
+
+ldbl_strong_alias (___aprintf, __aprintf)
+ldbl_weak_alias (___aprintf, aprintf)
