new file mode 100644
@@ -0,0 +1,38 @@
+From a7025904e3330dd6cf95f3664ef6fc77034cc5e1 Mon Sep 17 00:00:00 2001
+From: Sune Vuorela <sune@vuorela.dk>
+Date: Tue, 29 Jul 2025 14:14:00 +0200
+Subject: [PATCH] Fix crash in pdfseparate
+
+Don't continue recursing in PDFDoc::mark* if things looks a bit weirder
+than expected
+
+CVE: CVE-2025-50420
+Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/a7025904e3330dd6cf95f3664ef6fc77034cc5e1]
+
+Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
+---
+ poppler/PDFDoc.cc | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
+index 20bb191..c2e90be 100644
+--- a/poppler/PDFDoc.cc
++++ b/poppler/PDFDoc.cc
+@@ -1771,6 +1771,15 @@ bool PDFDoc::markAnnotations(Object *annotsObj, XRef *xRef, XRef *countRef, unsi
+ if (obj1.isDict()) {
+ Dict *dict = obj1.getDict();
+ Object type = dict->lookup("Type");
++ if (type.isNull()) {
++ Object subType = dict->lookup("SubType");
++ // Type is optional, subtype is required
++ // If neither of them exists, something is probably
++ // weird here, so let us just skip this entry
++ if (subType.isNull()) {
++ continue;
++ }
++ }
+ if (type.isName() && strcmp(type.getName(), "Annot") == 0) {
+ const Object &obj2 = dict->lookupNF("P");
+ if (obj2.isRef()) {
+--
+2.40.0
@@ -18,6 +18,7 @@ SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \
file://CVE-2025-52886-0002.patch \
file://CVE-2025-52886-0003.patch \
file://CVE-2025-52886-0004.patch \
+ file://CVE-2025-50420.patch \
"
SRC_URI[sha256sum] = "813fb4b90e7bda63df53205c548602bae728887a60f4048aae4dbd9b1927deff"