[packages/rt/RT_4_4] Rel 3. Backport security fixes from RT 5.0.10 and 5.0.11

arekm arekm at pld-linux.org
Thu Oct 29 22:51:49 CET 2026


commit 1f1e4d095adbf4fd66d9e1202cc4ff13757b281b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Oct 29 22:46:33 2026 +0100

    Rel 3. Backport security fixes from RT 5.0.10 and 5.0.11
    
    Upstream no longer releases 4.4; the fixes come from the 5.0 security
    branches, adapted where 4.4 code differs, plus PLD hardening of the
    incomplete TSV export and RSS feed fixes.
    
    Fixes CVE-2026-108371, CVE-2026-108353, CVE-2026-108352,
    CVE-2026-108351, CVE-2026-108350, CVE-2026-108349, CVE-2026-108348,
    CVE-2026-108347, CVE-2026-108346, CVE-2026-108344, CVE-2026-108343,
    CVE-2026-108342, CVE-2026-108282, CVE-2026-108281, CVE-2026-108280,
    CVE-2026-108278, CVE-2026-108276, CVE-2026-108275, CVE-2026-108274,
    CVE-2026-108273, CVE-2026-108272, CVE-2026-108271, CVE-2026-108270,
    CVE-2026-44231, CVE-2026-44229, CVE-2026-41076, CVE-2026-41075,
    CVE-2026-41073.

 rt-CVE-2026-108270.patch | 119 ++++++++++++
 rt-CVE-2026-108271.patch | 232 +++++++++++++++++++++++
 rt-CVE-2026-108272.patch | 105 +++++++++++
 rt-CVE-2026-108273.patch | 291 +++++++++++++++++++++++++++++
 rt-CVE-2026-108274.patch | 190 +++++++++++++++++++
 rt-CVE-2026-108275.patch | 336 +++++++++++++++++++++++++++++++++
 rt-CVE-2026-108276.patch | 104 +++++++++++
 rt-CVE-2026-108278.patch |  60 ++++++
 rt-CVE-2026-108280.patch | 110 +++++++++++
 rt-CVE-2026-108281.patch | 110 +++++++++++
 rt-CVE-2026-108282.patch | 319 ++++++++++++++++++++++++++++++++
 rt-CVE-2026-108342.patch | 473 +++++++++++++++++++++++++++++++++++++++++++++++
 rt-CVE-2026-108343.patch | 143 ++++++++++++++
 rt-CVE-2026-108344.patch | 116 ++++++++++++
 rt-CVE-2026-108346.patch | 211 +++++++++++++++++++++
 rt-CVE-2026-108347.patch |  52 ++++++
 rt-CVE-2026-108348.patch | 367 ++++++++++++++++++++++++++++++++++++
 rt-CVE-2026-108349.patch | 152 +++++++++++++++
 rt-CVE-2026-108350.patch | 122 ++++++++++++
 rt-CVE-2026-108351.patch |  97 ++++++++++
 rt-CVE-2026-108352.patch |  35 ++++
 rt-CVE-2026-108353.patch |  64 +++++++
 rt-CVE-2026-108371.patch |  58 ++++++
 rt-CVE-2026-41073.patch  |  31 ++++
 rt-CVE-2026-41075.patch  |  36 ++++
 rt-CVE-2026-41076.patch  |  31 ++++
 rt-CVE-2026-44229.patch  |  34 ++++
 rt-CVE-2026-44231.patch  | 398 +++++++++++++++++++++++++++++++++++++++
 rt-CVE-2026-6841.patch   |  56 ++++++
 rt-attribute-links.patch |  92 +++++++++
 rt-rss-orderby.patch     |  38 ++++
 rt-tsv-cells.patch       |  58 ++++++
 rt.spec                  |  73 +++++++-
 33 files changed, 4710 insertions(+), 3 deletions(-)
---
diff --git a/rt.spec b/rt.spec
index 930eba1..eb21496 100644
--- a/rt.spec
+++ b/rt.spec
@@ -44,7 +44,7 @@ Summary:	Request Tracker
 Summary(pl.UTF-8):	Request Tracker - system do śledzenia zleceń
 Name:		rt
 Version:	4.4.9
-Release:	2
+Release:	3
 License:	GPL v2
 Group:		Applications
 # https://bestpractical.com/download-page
@@ -59,6 +59,40 @@ Patch0:		%{name}-layout.patch
 Patch1:		%{name}-config.patch
 Patch2:		rt-timeworked.patch
 Patch3:		%{name}-fts-phrase.patch
+# security fixes from RT 5.0.10 and 5.0.11 backported to 4.4, which upstream
+# no longer releases; each part carries its upstream cherry-pick line
+Patch100:	%{name}-CVE-2026-41073.patch
+Patch101:	%{name}-tsv-cells.patch
+Patch102:	%{name}-CVE-2026-41075.patch
+Patch103:	%{name}-CVE-2026-41076.patch
+Patch104:	%{name}-CVE-2026-6841.patch
+Patch105:	%{name}-CVE-2026-44229.patch
+Patch106:	%{name}-CVE-2026-44231.patch
+Patch107:	%{name}-CVE-2026-108270.patch
+Patch108:	%{name}-CVE-2026-108271.patch
+Patch109:	%{name}-attribute-links.patch
+Patch110:	%{name}-CVE-2026-108272.patch
+Patch111:	%{name}-CVE-2026-108273.patch
+Patch112:	%{name}-CVE-2026-108274.patch
+Patch113:	%{name}-CVE-2026-108275.patch
+Patch114:	%{name}-CVE-2026-108276.patch
+Patch115:	%{name}-CVE-2026-108278.patch
+Patch116:	%{name}-rss-orderby.patch
+Patch117:	%{name}-CVE-2026-108280.patch
+Patch118:	%{name}-CVE-2026-108281.patch
+Patch119:	%{name}-CVE-2026-108282.patch
+Patch120:	%{name}-CVE-2026-108342.patch
+Patch121:	%{name}-CVE-2026-108343.patch
+Patch122:	%{name}-CVE-2026-108344.patch
+Patch123:	%{name}-CVE-2026-108346.patch
+Patch124:	%{name}-CVE-2026-108347.patch
+Patch125:	%{name}-CVE-2026-108348.patch
+Patch126:	%{name}-CVE-2026-108349.patch
+Patch127:	%{name}-CVE-2026-108350.patch
+Patch128:	%{name}-CVE-2026-108351.patch
+Patch129:	%{name}-CVE-2026-108352.patch
+Patch130:	%{name}-CVE-2026-108353.patch
+Patch131:	%{name}-CVE-2026-108371.patch
 URL:		http://www.bestpractical.com/rt/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -79,6 +113,7 @@ BuildRequires:	perl-Class-ReturnValue >= %{perl_class_returnvalue_ver}
 BuildRequires:	perl-Convert-Color
 BuildRequires:	perl-Crypt-Eksblowfish
 BuildRequires:	perl-Crypt-SSLeay
+BuildRequires:	perl-Crypt-URandom
 BuildRequires:	perl-Crypt-X509
 BuildRequires:	perl-DBD-mysql >= %{perl_dbd_mysql}
 BuildRequires:	perl-DBI >= %{perl_dbi_ver}
@@ -109,7 +144,7 @@ BuildRequires:	perl-GnuPG-Interface
 BuildRequires:	perl-GraphViz
 BuildRequires:	perl-HTML-FormatExternal
 BuildRequires:	perl-HTML-FormatText-WithLinks-AndTables
-BuildRequires:	perl-HTML-Gumbo
+BuildRequires:	perl-HTML-Gumbo >= 0.19
 BuildRequires:	perl-HTML-Mason >= %{perl_html_mason_ver}
 BuildRequires:	perl-HTML-Mason-PSGIHandler
 BuildRequires:	perl-HTML-Parser
@@ -211,7 +246,7 @@ Requires:	perl-GnuPG-Interface
 Requires:	perl-GraphViz
 Requires:	perl-HTML-FormatExternal
 Requires:	perl-HTML-FormatText-WithLinks-AndTables
-Requires:	perl-HTML-Gumbo
+Requires:	perl-HTML-Gumbo >= 0.19
 Requires:	perl-HTML-Mason >= %{perl_html_mason_ver}
 Requires:	perl-HTML-Mason-PSGIHandler
 Requires:	perl-HTML-Quoted
@@ -324,6 +359,38 @@ Pliki wspomagające używanie RT z Apache.
 %patch -P1 -p1
 %patch -P2 -p1
 %patch -P3 -p1
+%patch -P100 -p1
+%patch -P101 -p1
+%patch -P102 -p1
+%patch -P103 -p1
+%patch -P104 -p1
+%patch -P105 -p1
+%patch -P106 -p1
+%patch -P107 -p1
+%patch -P108 -p1
+%patch -P109 -p1
+%patch -P110 -p1
+%patch -P111 -p1
+%patch -P112 -p1
+%patch -P113 -p1
+%patch -P114 -p1
+%patch -P115 -p1
+%patch -P116 -p1
+%patch -P117 -p1
+%patch -P118 -p1
+%patch -P119 -p1
+%patch -P120 -p1
+%patch -P121 -p1
+%patch -P122 -p1
+%patch -P123 -p1
+%patch -P124 -p1
+%patch -P125 -p1
+%patch -P126 -p1
+%patch -P127 -p1
+%patch -P128 -p1
+%patch -P129 -p1
+%patch -P130 -p1
+%patch -P131 -p1
 
 mv aclocal.m4 acinclude.m4
 
diff --git a/rt-CVE-2026-108270.patch b/rt-CVE-2026-108270.patch
new file mode 100644
index 0000000..65238c2
--- /dev/null
+++ b/rt-CVE-2026-108270.patch
@@ -0,0 +1,119 @@
+# CVE-2026-108270: Authorization bypass and information disclosure in ticket forwarding
+From 21f15d1acf360f7c1a32eabbc9c24eb4e9a01905 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Mon, 10 Aug 2026 21:07:34 -0400
+Subject: [PATCH] Only forward tickets and transactions the current user can
+ see
+
+(cherry picked from commit a1212c55515079be84d215c5145134c8bd98a720)
+CVE: CVE-2026-108270
+
+Backport: The MIMEObj header handling in the conflicting Forward hunk is a 5.0
+feature that 4.4 does not have; only the transaction check is taken.
+
+diff --git a/lib/RT/Action/SendForward.pm b/lib/RT/Action/SendForward.pm
+index 4d057e445..e5713e76c 100644
+--- a/lib/RT/Action/SendForward.pm
++++ b/lib/RT/Action/SendForward.pm
+@@ -65,10 +65,22 @@ sub Prepare {
+ 
+     my $txn = $self->TransactionObj;
+ 
++    my $forwarded;
++    my $creator = RT::CurrentUser->new( $txn->Creator );
+     if ( $txn->Type eq 'Forward Transaction' ) {
+-        my $forwarded_txn = RT::Transaction->new( $self->CurrentUser );
+-        $forwarded_txn->Load( $txn->Field );
+-        $self->{ForwardedTransactionObj} = $forwarded_txn;
++        $forwarded = RT::Transaction->new($creator);
++        $forwarded->Load( $txn->Field );
++        $self->{ForwardedTransactionObj} = $forwarded;
++    }
++    else {
++        $forwarded = RT::Ticket->new($creator);
++        $forwarded->Load( $self->TicketObj->id );
++        $self->{ForwardedTicketObj} = $forwarded;
++    }
++
++    unless ( $creator->id && $forwarded->id && $forwarded->CurrentUserCanSee ) {
++        RT->Logger->error( "Not forwarding transaction " . $txn->id . ": not visible to its creator" );
++        return undef;
+     }
+ 
+     my ( $result, $message ) = $self->TemplateObj->Parse(
+@@ -90,7 +102,7 @@ sub Prepare {
+         $entity = $self->ForwardedTransactionObj->ContentAsMIME;
+     }
+     else {
+-        my $txns = $self->TicketObj->Transactions;
++        my $txns = $self->ForwardedTicketObj->Transactions;
+         $txns->Limit(
+             FIELD    => 'Type',
+             OPERATOR => 'IN',
+@@ -133,6 +145,11 @@ sub ForwardedTransactionObj {
+     return $self->{'ForwardedTransactionObj'};
+ }
+ 
++sub ForwardedTicketObj {
++    my $self = shift;
++    return $self->{'ForwardedTicketObj'};
++}
++
+ RT::Base->_ImportOverlays();
+ 
+ 1;
+diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
+index 53e397976..1f8ba6b6a 100644
+--- a/lib/RT/Ticket.pm
++++ b/lib/RT/Ticket.pm
+@@ -3175,10 +3175,25 @@ sub Forward {
+         @_
+     );
+ 
+-    unless ( $self->CurrentUserHasRight('ForwardMessage') ) {
++    unless ( $self->CurrentUserCanSee && $self->CurrentUserHasRight('ForwardMessage') ) {
+         return ( 0, $self->loc("Permission Denied") );
+     }
+ 
++    if ( $args{Transaction} ) {
++        my $txn = RT::Transaction->new( $self->CurrentUser );
++        $txn->Load( $args{Transaction}->id );
++
++        unless ($txn->id
++            && $txn->CurrentUserCanSee
++            && $txn->ObjectType eq 'RT::Ticket'
++            && $txn->Object->id == $self->id )
++        {
++            return ( 0, $self->loc("Permission Denied") );
++        }
++
++        $args{Transaction} = $txn;
++    }
++
+     $args{$_} = join ", ", map { $_->format } RT::EmailParser->ParseEmailAddress( $args{$_} || '' ) for qw(To Cc Bcc);
+ 
+     return (0, $self->loc("Can't forward: no valid email addresses specified") )
+diff --git a/share/html/Ticket/Forward.html b/share/html/Ticket/Forward.html
+index 218b1071f..70575d502 100644
+--- a/share/html/Ticket/Forward.html
++++ b/share/html/Ticket/Forward.html
+@@ -119,7 +119,7 @@ $m->comp( '/Elements/Crypt/SignEncryptWidget:Process',
+ );
+ 
+ Abort( loc("Permission Denied") )
+-    unless $TicketObj->CurrentUserHasRight('ForwardMessage');
++    unless $TicketObj->CurrentUserCanSee && $TicketObj->CurrentUserHasRight('ForwardMessage');
+ 
+ my $txn;
+ if ( $QuoteTransaction ) {
+@@ -127,6 +127,10 @@ if ( $QuoteTransaction ) {
+     $txn->Load( $QuoteTransaction );
+     Abort( loc("Couldn't load transaction #[_1]", $QuoteTransaction) )
+         unless $txn->id;
++    Abort( loc("Permission Denied") )
++        unless $txn->CurrentUserCanSee
++        && $txn->ObjectType eq 'RT::Ticket'
++        && $txn->Object->id == $TicketObj->id;
+ }
+ 
+ if ( $Forward || $ForwardAndReturn ) {
diff --git a/rt-CVE-2026-108271.patch b/rt-CVE-2026-108271.patch
new file mode 100644
index 0000000..6ca44a0
--- /dev/null
+++ b/rt-CVE-2026-108271.patch
@@ -0,0 +1,232 @@
+# CVE-2026-108271: Incorrect authorization of the destination in dashboard, saved search, article, and REST 2.0 operations
+From 90366fbdc9bdc3e6f3b8ad4d6ae6ae887c95c5bd Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Fri, 14 Aug 2026 12:29:54 -0400
+Subject: [PATCH 1/3] Authorize the destination container before moving a
+ shared setting
+
+This is consistent with moving tickets to a different queue.
+
+The saved search privacy dropdown has only ever offered RT::System to
+SuperUsers, but the attribute rights asked for EditSavedSearches there.
+Require SuperUser for RT::System as well, so the two agree.
+
+(cherry picked from commit c843c131c8064ff63b732cac59f7fab63feb305d)
+
+CVE: CVE-2026-108271
+
+Backport: t/web/shared_setting_move_destination.t added for RT 4.4,
+covering the dashboard (RT::SharedSetting::Update) and saved search
+(EditSearches) move paths.
+
+diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
+index 739c957bd..5f32b8a52 100644
+--- a/lib/RT/Attribute.pm
++++ b/lib/RT/Attribute.pm
+@@ -89,6 +89,13 @@ our $PERSONAL_ACL_MAP = {
+ 
+ };
+ 
++our $SYSTEM_ACL_MAP = {
++    SavedSearch => { create => 'SuperUser',
++                     update => 'SuperUser',
++                     delete => 'SuperUser' },
++
++};
++
+ =head2 LookupObjectRight { ObjectType => undef, ObjectId => undef, Name => undef, Right => { create, update, delete, display } }
+ 
+ Returns the right that the user needs to have on this attribute's object to perform the related attribute operation. Returns "allow" if the right is otherwise unspecified.
+@@ -103,6 +110,12 @@ sub LookupObjectRight {
+                  Name => undef,
+                  @_);
+ 
++    # if it's an attribute on the whole instance, check the system acl map first
++    if ( $args{'ObjectType'} eq 'RT::System' ) {
++        my $right = $SYSTEM_ACL_MAP->{ $args{'Name'} // '' }{ $args{'Right'} // '' };
++        return $right if $right;
++    }
++
+     # if it's an attribute on oneself, check the personal acl map
+     if (($args{'ObjectType'} eq 'RT::User') && ($args{'ObjectId'} eq $self->CurrentUser->Id)) {
+     return('allow') unless ($PERSONAL_ACL_MAP->{$args{'Name'}});
+diff --git a/lib/RT/SavedSearch.pm b/lib/RT/SavedSearch.pm
+index 7dd2901f5..16d9f4983 100644
+--- a/lib/RT/SavedSearch.pm
++++ b/lib/RT/SavedSearch.pm
+@@ -115,6 +115,37 @@ sub UpdateAttribute {
+     return ($status, $msg);
+ }
+ 
++=head2 CurrentUserCanCreate [PRIVACY]
++
++Returns true if the current user may save a search under PRIVACY, which defaults
++to this search's own privacy, asking L<RT::Attribute/LookupObjectRight> so that
++the answer is the one L<RT::Attribute/Create> would give.
++
++The other C<CurrentUserCan*> methods are still L<RT::SharedSetting>'s, which
++leave the question to L<RT::Attribute>. This one is here because a caller that
++wants to move a search has to ask about a container it has not reached yet.
++
++=cut
++
++sub CurrentUserCanCreate {
++    my $self    = shift;
++    my $privacy = shift || $self->Privacy;
++
++    my $object = $self->_GetObject($privacy);
++    return 0 unless $object;
++
++    my $right = RT::Attribute->new( $self->CurrentUser )->LookupObjectRight(
++        ObjectType => ref($object),
++        ObjectId   => $object->Id,
++        Name       => 'SavedSearch',
++        Right      => 'create',
++    );
++
++    return 1 if $right eq 'allow';
++    return 0 if $right eq 'deny';
++    return $self->CurrentUser->HasRight( Right => $right, Object => $object ) ? 1 : 0;
++}
++
+ =head2 RT::SavedSearch->EscapeDescription STRING
+ 
+ This is a class method because system-level saved searches aren't true
+diff --git a/lib/RT/SharedSetting.pm b/lib/RT/SharedSetting.pm
+index a428ef9e8..69cbb87fe 100644
+--- a/lib/RT/SharedSetting.pm
++++ b/lib/RT/SharedSetting.pm
+@@ -234,6 +234,10 @@ Updates the parameters of an existing shared setting. Any arguments are passed
+ to the L</UpdateAttribute> method. Returns a tuple of status and message, where
+ status is true on success.
+ 
++A C<Privacy> that names a different container moves the setting there, which
++takes the rights to create it there as well as the rights to modify it where it
++is now.
++
+ =cut
+ 
+ sub Update {
+@@ -247,6 +251,12 @@ sub Update {
+     return (0, $self->loc("Permission Denied"))
+         unless $self->CurrentUserCanModify;
+ 
++    if ( defined $args{'Privacy'} && $args{'Privacy'} ne ( $self->Privacy // '' ) ) {
++        return ( 0, $self->loc("Permission Denied") )
++            unless $self->_GetObject( $args{'Privacy'} )
++            && $self->CurrentUserCanCreate( $args{'Privacy'} );
++    }
++
+     my ($status, $msg) = $self->UpdateAttribute(\%args);
+ 
+     return (1, $self->loc("[_1] update: Nothing changed", ucfirst($self->ObjectName)))
+diff --git a/share/html/Search/Elements/EditSearches b/share/html/Search/Elements/EditSearches
+index 322743e72..a5a45c3b7 100644
+--- a/share/html/Search/Elements/EditSearches
++++ b/share/html/Search/Elements/EditSearches
+@@ -329,7 +329,12 @@ if ( $obj && $obj->id ) {
+         # or it will fail the 2nd change if we use SetObjectType and
+         # SetObjectId sequentially
+ 
+-        if ( $obj->CurrentUserHasRight('update') ) {
++        # __Set skips the ACL as well, so the destination has to be authorized
++        # here: landing the search there takes the rights to have saved it there
++        my $can_move = ( $new_obj_type eq $obj_type && $new_obj_id == $obj_id )
++            || RT::SavedSearch->new( $session{'CurrentUser'} )->CurrentUserCanCreate("$new_obj_type-$new_obj_id");
++
++        if ( $can_move && $obj->CurrentUserHasRight('update') ) {
+             if ( $new_obj_type ne $obj_type ) {
+                 ( $val, $msg ) = $obj->__Set(
+                     Field => 'ObjectType',
+
+From 988e42f3238cce51ca9d3ed3a80cd247ca068697 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Tue, 23 Jun 2026 12:58:55 -0400
+Subject: [PATCH 2/3] Require a valid class when setting class on an article
+
+Although enforced in the web UI via some JS checks, if there was
+a JS error, it was possible to submit a blank value for Class
+when modifying an article. Previously this would set the class
+on the article to undef, which should not be allowed.
+
+Validate the incoming value and set class only to another valid
+class. This mirrors similar checks on article create.
+
+(cherry picked from commit 4319fba63478a1cb92489db649629ffd933f7054)
+
+CVE: CVE-2026-108271
+
+Backport: RT 4.4 had no explicit SetClass (the generated accessor went
+straight to _Set), so this adds it. The "Name in use in destination class"
+check is left out: RT 4.4 ValidateName takes no class and article names
+are unique across classes, which Create and SetName already enforce.
+
+diff --git a/lib/RT/Article.pm b/lib/RT/Article.pm
+index 9a2dc5b92..4f5b7e493 100644
+--- a/lib/RT/Article.pm
++++ b/lib/RT/Article.pm
+@@ -495,6 +495,32 @@ sub _Set {
+ 
+ }
+ 
++=head2 SetClass CLASS
++
++Set the class for this article.
++
++=cut
++
++sub SetClass {
++    my $self  = shift;
++    my $value = shift;
++
++    unless ( $self->CurrentUserHasRight('ModifyArticle') ) {
++        return ( 0, $self->loc("Permission Denied") );
++    }
++
++    # An article must always belong to a valid class. Reject empty/undef/0
++    # or any value that doesn't load a class, mirroring Create.
++    my $class = RT::Class->new( $self->CurrentUser );
++    $class->Load($value) if defined $value && length $value;
++    unless ( $class->Id ) {
++        return ( 0, $self->loc('Invalid Class') );
++    }
++    $value = $class->Id;    # normalize a class name to its id
++
++    return ( $self->_Set( Field => 'Class', Value => $value ) );
++}
++
+ =head2 _Value PARAM
+ 
+ Return "PARAM" for this object. if the current user doesn't have rights, returns undef
+
+From 584b36a711499e8015fe8acc4b2141d29c374d16 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Fri, 14 Aug 2026 14:19:38 -0400
+Subject: [PATCH 3/3] Require CreateArticle on the destination class when
+ moving articles
+
+This is consistent with tickets and assets, which require CreateTicket and
+CreateAsset on the destination queue and catalog, respectively.
+
+(cherry picked from commit d34baa332b479e4ffc205b5dd83060d5895c095b)
+
+CVE: CVE-2026-108271
+
+Backport: docs/UPGRADING-5.0 hunk dropped. t/api/article_set_class.t added
+for RT 4.4.
+
+diff --git a/lib/RT/Article.pm b/lib/RT/Article.pm
+index 4f5b7e493..3bdea1a99 100644
+--- a/lib/RT/Article.pm
++++ b/lib/RT/Article.pm
+@@ -518,6 +518,10 @@ sub SetClass {
+     }
+     $value = $class->Id;    # normalize a class name to its id
+ 
++    if ( $value != $self->__Value('Class') ) {
++        return ( 0, $self->loc("Permission Denied") ) unless $class->CurrentUserHasRight('CreateArticle');
++    }
++
+     return ( $self->_Set( Field => 'Class', Value => $value ) );
+ }
+ 
diff --git a/rt-CVE-2026-108272.patch b/rt-CVE-2026-108272.patch
new file mode 100644
index 0000000..4f5e756
--- /dev/null
+++ b/rt-CVE-2026-108272.patch
@@ -0,0 +1,105 @@
+# CVE-2026-108272: Forged cryptographic signature status in incoming GnuPG and S/MIME mail
+From 121786d17bf412d1762f0b1ea4e24fc0cf8f01a4 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Fri, 14 Aug 2026 17:09:10 -0400
+Subject: [PATCH] Sanitize Crypt headers on MIME child parts
+
+MIME child parts in an encrypted email or signed email can have
+their own headers, extracted only after the message is decrypted.
+Perform another pass on provided headers to remove any RT crypt
+headers that may be present in the incoming message and replace them
+with verified values.
+
+(cherry picked from commit 24cd71c4e82dd532773c515256999f4a0f2995bc)
+CVE: CVE-2026-108272
+
+diff --git a/lib/RT/Crypt.pm b/lib/RT/Crypt.pm
+index 4482ae935..cd5d7ef61 100644
+--- a/lib/RT/Crypt.pm
++++ b/lib/RT/Crypt.pm
+@@ -569,13 +569,11 @@ sub VerifyDecrypt {
+             %args, Protocol => $protected->{'Protocol'}, Info => $protected
+         );
+ 
+-        # Let the header be modified so continuations are handled
+-        my $modify = $res{status_on}->head->modify;
+-        $res{status_on}->head->modify(1);
+-        $res{status_on}->head->add(
+-            "X-RT-" . $protected->{'Protocol'} . "-Status" => Encode::encode( "UTF-8", $res{'status'} )
++        $self->AddStatusHeader(
++            Entity   => $res{status_on},
++            Protocol => $protected->{'Protocol'},
++            Status   => $res{'status'},
+         );
+-        $res{status_on}->head->modify($modify);
+ 
+         push @res, \%res;
+     }
+@@ -586,6 +584,37 @@ sub VerifyDecrypt {
+     return @res;
+ }
+ 
++=head2 AddStatusHeader Entity => ENTITY, Protocol => NAME, Status => STATUS
++
++Records the C<STATUS> a crypt backend reported for protocol C<NAME> on the
++L<MIME::Entity> C<ENTITY>, as an C<X-RT-I<NAME>-Status> header. Existing
++headers of that name are kept, since a single entity can be the subject of
++more than one operation.
++
++=cut
++
++sub AddStatusHeader {
++    my $self = shift;
++    my %args = (
++        Entity   => undef,
++        Protocol => undef,
++        Status   => undef,
++        @_
++    );
++
++    my $head = $args{'Entity'}->head;
++
++    # Let the header be modified so continuations are handled
++    my $modify = $head->modify;
++    $head->modify(1);
++    $head->add(
++        "X-RT-" . $args{'Protocol'} . "-Status" => Encode::encode( "UTF-8", $args{'Status'} )
++    );
++    $head->modify($modify);
++
++    return;
++}
++
+ =head2 DecryptContent Protocol => NAME, Content => STRINGREF, [Passphrase => undef]
+ 
+ Decrypts the content in the string reference in-place.  All other
+diff --git a/lib/RT/Interface/Email/Crypt.pm b/lib/RT/Interface/Email/Crypt.pm
+index a063e5fd7..3d082049f 100644
+--- a/lib/RT/Interface/Email/Crypt.pm
++++ b/lib/RT/Interface/Email/Crypt.pm
+@@ -89,6 +89,25 @@ sub VerifyDecrypt {
+         %args,
+         Entity => $args{'Message'},
+     );
++
++    # Verifying and decrypting replaces protected parts with their plaintext,
++    # so parts built from the message body enter the entity object only now.
++    # Whatever headers the sender included are added, including the
++    # ones cleaned previously. Clean the whole entity a second time and then write
++    # back only what the crypt backends themselves reported, so the status
++    # below is derived from the backend results alone.
++
++    foreach my $p ( $args{'Message'}->parts_DFS ) {
++        $p->head->delete($_) for @headers;
++    }
++    foreach my $res ( @res ) {
++        RT::Crypt->AddStatusHeader(
++            Entity   => $res->{'status_on'},
++            Protocol => $res->{'Protocol'},
++            Status   => $res->{'status'},
++        );
++    }
++
+     if ( !@res ) {
+         $args{'Message'}->head->replace(
+             'X-RT-Incoming-Encryption' => 'Not encrypted'
diff --git a/rt-CVE-2026-108273.patch b/rt-CVE-2026-108273.patch
new file mode 100644
index 0000000..cc78522
--- /dev/null
+++ b/rt-CVE-2026-108273.patch
@@ -0,0 +1,291 @@
+# CVE-2026-108273: Ticket recipient disclosure via missing authorization checks on the ticket People and Update pages
+From afe3161e81e15533b49b88d2f968bc1b11e4a309 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Tue, 11 Aug 2026 08:32:02 -0400
+Subject: [PATCH] Explicitly check ShowTicket on ticket support pages
+
+In most cases, object rights on the RT::Ticket object prevent
+users from seeing ticket content they don't have rights to.
+However, some operations like using DryRun to determine recipients
+require running as the RT System User, so the object-level check is
+missed. Other accessors don't apply it at all: OwnerObj skips it
+outright, and RoleGroup gates on SeeQueue instead. Explicitly check
+ShowTicket on the pages themselves to handle these cases.
+
+This changes what ReplyToTicket alone allows. The update forms now
+require ShowTicket, so a user granted ReplyToTicket without
+ShowTicket can no longer reply from the web UI at all.
+
+An approval type default value is included to handle checks where
+the current user doesn't have rights to view the Type field. This
+was a pre-existing issue revealed during testing.
+
+As @results doesn't guarantee the change is successful, this commit also
+drops the message "A change was applied successfully...".
+
+(cherry picked from commit 0cbc8a428850b95227c601cf861a7f26c7016619)
+CVE: CVE-2026-108273
+
+diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
+index eeff62464..7737678b1 100644
+--- a/lib/RT/Interface/Web.pm
++++ b/lib/RT/Interface/Web.pm
+@@ -2159,7 +2159,8 @@ sub MaybeRedirectToApproval {
+         my $ticket = RT::Ticket->new( $session{'CurrentUser'} );
+         $ticket->Load($id);
+ 
+-        if ($ticket and $ticket->id and lc($ticket->Type) eq 'approval') {
++        # Type is undef for a ticket the current user cannot see
++        if ($ticket and $ticket->id and lc($ticket->Type // '') eq 'approval') {
+             MaybeRedirectForResults(
+                 Path      => "/Approvals/Display.html",
+                 Force     => 1,
+diff --git a/share/html/Helpers/PreviewScrips b/share/html/Helpers/PreviewScrips
+index e8e1ea77b..97d36e12e 100644
+--- a/share/html/Helpers/PreviewScrips
++++ b/share/html/Helpers/PreviewScrips
+@@ -51,6 +51,12 @@ $TicketObj->Load($ARGS{id});
+ $m->abort unless $TicketObj->id && $ARGS{UpdateType};
+ 
+ $m->abort unless $TicketObj->CurrentUserHasRight('ShowOutgoingEmail');
++
++# Recipients are computed from scrips prepared as RT_System, so they are not
++# filtered by the requesting user's visibility. Render them only to a user who
++# is allowed to see the ticket.
++$m->abort unless $TicketObj->CurrentUserHasRight('ShowTicket');
++
+ if ( $ARGS{UpdateType} eq 'private' ) {
+     $m->abort
+       unless $TicketObj->CurrentUserHasRight( 'CommentOnTicket' ) || $TicketObj->CurrentUserHasRight( 'ModifyTicket' );
+diff --git a/share/html/Helpers/ShowSimplifiedRecipients b/share/html/Helpers/ShowSimplifiedRecipients
+index 98da39ede..c17cc23e4 100644
+--- a/share/html/Helpers/ShowSimplifiedRecipients
++++ b/share/html/Helpers/ShowSimplifiedRecipients
+@@ -52,6 +52,11 @@ my $TicketObj = RT::Ticket->new($session{CurrentUser});
+ $TicketObj->Load($ARGS{id});
+ $m->abort unless $TicketObj->id && $ARGS{UpdateType};
+ 
++# Recipients are computed from scrips prepared as RT_System, so they are not
++# filtered by the requesting user's visibility. Render them only to a user who
++# is allowed to see the ticket.
++$m->abort unless $TicketObj->CurrentUserHasRight('ShowTicket');
++
+ if ( $ARGS{UpdateType} eq 'private' ) {
+     $m->abort
+       unless $TicketObj->CurrentUserHasRight( 'CommentOnTicket' ) || $TicketObj->CurrentUserHasRight( 'ModifyTicket' );
+diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
+index 10f938e6d..385b7fca9 100644
+--- a/share/html/Ticket/Display.html
++++ b/share/html/Ticket/Display.html
+@@ -196,11 +196,11 @@ if ($ARGS{'id'} eq 'new') {
+     });
+     if ( !$SkipProcessing ) {
+         unless ($TicketObj->CurrentUserHasRight('ShowTicket')) {
+-            if (@Actions) {
+-                Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@Actions, Code => HTTP::Status::HTTP_FORBIDDEN);
+-            } else {
+-                Abort("No permission to view ticket", Code => HTTP::Status::HTTP_FORBIDDEN);
+-            }
++            Abort(
++                loc("No permission to view ticket"),
++                Actions => \@Actions,
++                Code    => HTTP::Status::HTTP_FORBIDDEN,
++            );
+         }
+         if ( $ARGS{'MarkAsSeen'} ) {
+             $TicketObj->SetAttribute(
+diff --git a/share/html/Ticket/History.html b/share/html/Ticket/History.html
+index 4ec8f1edd..42885f699 100644
+--- a/share/html/Ticket/History.html
++++ b/share/html/Ticket/History.html
+@@ -74,7 +74,10 @@ $id => undef
+ my $Ticket = LoadTicket ($id);
+ 
+ unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
+-    Abort("No permission to view ticket");
++    Abort(
++        loc("No permission to view ticket"),
++        Code => HTTP::Status::HTTP_FORBIDDEN,
++    );
+ }
+ 
+ $Ticket->CurrentUser->AddRecentlyViewedTicket($Ticket);
+diff --git a/share/html/Ticket/Modify.html b/share/html/Ticket/Modify.html
+index 11ba5a676..ab83a0422 100644
+--- a/share/html/Ticket/Modify.html
++++ b/share/html/Ticket/Modify.html
+@@ -116,11 +116,11 @@ unless ($skip_update) {
+ }
+ 
+ unless ($TicketObj->CurrentUserHasRight('ShowTicket')) {
+-    if (@results) {
+-        Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@results);
+-    } else {
+-        Abort("No permission to view ticket");
+-    }
++    Abort(
++        loc("No permission to view ticket"),
++        Actions => \@results,
++        Code    => HTTP::Status::HTTP_FORBIDDEN,
++    );
+ }
+ 
+ $TicketObj->CurrentUser->AddRecentlyViewedTicket($TicketObj);
+diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
+index 025b5d191..e9c252636 100644
+--- a/share/html/Ticket/ModifyAll.html
++++ b/share/html/Ticket/ModifyAll.html
+@@ -215,11 +215,11 @@ unless ($skip_update or $OnlySearchForPeople or $OnlySearchForGroup or $ARGS{'Ad
+ 
+ # If they've gone and moved the ticket to somewhere they can't see, etc...
+ unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
+-    if (@results) {
+-        Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@results);
+-    } else {
+-        Abort("No permission to view ticket");
+-    }
++    Abort(
++        loc("No permission to view ticket"),
++        Actions => \@results,
++        Code    => HTTP::Status::HTTP_FORBIDDEN,
++    );
+ }
+ 
+ $Ticket->CurrentUser->AddRecentlyViewedTicket($Ticket);
+diff --git a/share/html/Ticket/ModifyDates.html b/share/html/Ticket/ModifyDates.html
+index f885e4b49..91b5e2cd3 100644
+--- a/share/html/Ticket/ModifyDates.html
++++ b/share/html/Ticket/ModifyDates.html
+@@ -72,6 +72,14 @@ $TicketObj->Atomic(sub{
+     push @results, ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
+ });
+ 
++unless ( $TicketObj->CurrentUserHasRight('ShowTicket') ) {
++    Abort(
++        loc("No permission to view ticket"),
++        Actions => \@results,
++        Code    => HTTP::Status::HTTP_FORBIDDEN,
++    );
++}
++
+ $TicketObj->CurrentUser->AddRecentlyViewedTicket($TicketObj);
+ 
+ </%INIT>
+diff --git a/share/html/Ticket/ModifyLinks.html b/share/html/Ticket/ModifyLinks.html
+index e52640f90..4bccec214 100644
+--- a/share/html/Ticket/ModifyLinks.html
++++ b/share/html/Ticket/ModifyLinks.html
+@@ -84,6 +84,14 @@ MaybeRedirectForResults(
+     Arguments   => { id => $id },
+ );
+ 
++unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
++    Abort(
++        loc("No permission to view ticket"),
++        Actions => \@results,
++        Code    => HTTP::Status::HTTP_FORBIDDEN,
++    );
++}
++
+ $Ticket->CurrentUser->AddRecentlyViewedTicket($Ticket);
+ 
+ </%INIT>
+diff --git a/share/html/Ticket/ModifyPeople.html b/share/html/Ticket/ModifyPeople.html
+index 5ffebfa0b..f6e5890a9 100644
+--- a/share/html/Ticket/ModifyPeople.html
++++ b/share/html/Ticket/ModifyPeople.html
+@@ -122,6 +122,14 @@ unless ($OnlySearchForPeople or $OnlySearchForGroup) {
+     });
+ }
+ 
++unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
++    Abort(
++        loc("No permission to view ticket"),
++        Actions => \@results,
++        Code    => HTTP::Status::HTTP_FORBIDDEN,
++    );
++}
++
+ # Use the ticket's scrips to figure out the new list of recipients.
+ my $notify_actor = RT->Config->Get( 'NotifyActor', $session{CurrentUser} );
+ 
+diff --git a/share/html/Ticket/Reminders.html b/share/html/Ticket/Reminders.html
+index 9f51b6c11..c8003c2ae 100644
+--- a/share/html/Ticket/Reminders.html
++++ b/share/html/Ticket/Reminders.html
+@@ -71,6 +71,14 @@ my @actions = $Ticket->Atomic(sub{
+     ProcessTicketReminders( TicketObj => $Ticket, ARGSRef => \%ARGS );
+ });
+ 
++unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
++    Abort(
++        loc("No permission to view ticket"),
++        Actions => \@actions,
++        Code    => HTTP::Status::HTTP_FORBIDDEN,
++    );
++}
++
+ $Ticket->CurrentUser->AddRecentlyViewedTicket($Ticket);
+ 
+ </%INIT>
+diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
+index f54c6ac22..6223a6fff 100644
+--- a/share/html/Ticket/Update.html
++++ b/share/html/Ticket/Update.html
+@@ -316,6 +316,15 @@ my $checks_failure = 0;
+ 
+ my $TicketObj = LoadTicket($id);
+ 
++# The update form renders ticket data that object rights do not filter, such
++# as single value custom role members, so require ShowTicket to display it.
++unless ( $TicketObj->CurrentUserHasRight('ShowTicket') ) {
++    Abort(
++        loc("No permission to view ticket"),
++        Code => HTTP::Status::HTTP_FORBIDDEN,
++    );
++}
++
+ my @results;
+ 
+ $m->callback( Ticket => $TicketObj, ARGSRef => \%ARGS, checks_failure => \$checks_failure, results => \@results, CallbackName => 'Initial' );
+diff --git a/share/html/m/ticket/reply b/share/html/m/ticket/reply
+index b91b229e9..fbf541f99 100644
+--- a/share/html/m/ticket/reply
++++ b/share/html/m/ticket/reply
+@@ -156,6 +156,15 @@ my $title;
+ 
+ my $t = LoadTicket($id);
+ 
++# The update form renders ticket data that object rights do not filter, such
++# as the current owner, so require ShowTicket to display it.
++unless ( $t->CurrentUserHasRight('ShowTicket') ) {
++    Abort(
++        loc("No permission to view ticket"),
++        Code => HTTP::Status::HTTP_FORBIDDEN,
++    );
++}
++
+ my @results;
+ 
+ $m->callback( Ticket => $t, ARGSRef => \%ARGS, results => \@results, CallbackName => 'Initial' );
+diff --git a/share/html/m/ticket/show b/share/html/m/ticket/show
+index 6e717a979..0f2013d84 100644
+--- a/share/html/m/ticket/show
++++ b/share/html/m/ticket/show
+@@ -111,11 +111,11 @@ if ($ARGS{'id'} eq 'new') {
+     });
+ 
+     unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
+-        if (@Actions) {
+-            Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@Actions);
+-        } else {
+-            Abort("No permission to view ticket");
+-        }
++        Abort(
++            loc("No permission to view ticket"),
++            Actions => \@Actions,
++            Code    => HTTP::Status::HTTP_FORBIDDEN,
++        );
+     }
+     if ( $ARGS{'MarkAsSeen'} ) {
+         $Ticket->SetAttribute(
diff --git a/rt-CVE-2026-108274.patch b/rt-CVE-2026-108274.patch
new file mode 100644
index 0000000..05cd958
--- /dev/null
+++ b/rt-CVE-2026-108274.patch
@@ -0,0 +1,190 @@
+# CVE-2026-108274: Insecure direct object reference in custom field values allows unauthorized read and modification
+From 2a35472b45d911a87e53d8364574f203681780ad Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Sun, 30 Aug 2026 07:56:55 -0400
+Subject: [PATCH 1/2] Enforce object-level See/Show rights on custom field
+ values
+
+In core RT, object custom field values are reached through the object
+they belong to. A ticket custom field, for example, is loaded on the
+ticket display page after the ticket itself, so the user's right to
+view that ticket has already been checked by the time a custom field
+value is loaded and shown.
+
+Make that check explicit in the custom field layer, so code that reads,
+adds, or deletes a value outside that context is still checked against
+the object the value belongs to.
+
+Allow for some exceptions:
+
+* User objects, which have no record-level See/Show right to defer to;
+* Objects that implement no visibility check of their own;
+* Values set while the object is being created;
+* Transaction custom fields set by the transaction's own author, who
+  cannot necessarily see the transaction yet.
+
+Deleting a value by id now also requires that the value belong to the
+object and custom field named by the caller, matching how DeleteValue
+handles the custom field's own option list.
+
+(cherry picked from commit 9f8964c07442233053029f867594a27550be6c19)
+CVE: CVE-2026-108274
+
+Backport: Conflict in ObjectCustomFieldValue::CurrentUserCanSee resolved to the
+upstream version (4.4 lacked the leading Id guard). The REST2 test
+change (dbb84d550) and 626a83f55 are not needed: REST2 is a separate
+extension in 4.4 and 4.4's Ticket::Atomic does not cache rights.
+
+diff --git a/lib/RT/CustomField.pm b/lib/RT/CustomField.pm
+index 8ffcf1145..c812de7d8 100644
+--- a/lib/RT/CustomField.pm
++++ b/lib/RT/CustomField.pm
+@@ -1784,6 +1784,32 @@ sub RemoveFromObject {
+ }
+ 
+ 
++=head2 CurrentUserCanSeeObject OBJECT
++
++Returns true if the current user can see OBJECT, the record a value of this
++custom field would be attached to, otherwise false.
++
++=cut
++
++sub CurrentUserCanSeeObject {
++    my $self   = shift;
++    my $object = shift;
++
++    return 0 unless $object && $object->id;
++    return 1 if $self->CurrentUser->Id == RT->SystemUser->Id;
++    return 1 if $object->isa('RT::User');
++    return 1 unless $object->can('CurrentUserCanSee');
++
++    # Transaction custom fields are updated right after the transaction is
++    # created, when its author can not necessarily see it yet.
++    if ( $object->isa('RT::Transaction') ) {
++        return 1 if ( $object->__Value('Creator') // 0 ) == $self->CurrentUser->Id;
++    }
++
++    return $object->CurrentUserCanSee ? 1 : 0;
++}
++
++
+ =head2 AddValueForObject HASH
+ 
+ Adds a custom field value for a record object of some kind. 
+@@ -1820,6 +1846,10 @@ sub AddValueForObject {
+         return ( 0, $self->loc('Permission Denied') );
+     }
+ 
++    unless ( $args{'ForCreation'} || $self->CurrentUserCanSeeObject($obj) ) {
++        return ( 0, $self->loc('Permission Denied') );
++    }
++
+     unless ( $self->MatchPattern($args{'Content'}) ) {
+         return ( 0, $self->loc('Input must match [_1]', $self->FriendlyPattern) );
+     }
+@@ -2048,8 +2078,9 @@ sub DeleteValueForObject {
+                  Id => undef,
+              @_ );
+ 
++    my $obj = $args{'Object'} or return ( 0, $self->loc('Invalid object') );
+ 
+-    unless ($self->CurrentUserHasRight('ModifyCustomField')) {
++    unless ($self->CurrentUserHasRight('ModifyCustomField') && $self->CurrentUserCanSeeObject($obj)) {
+         return (0, $self->loc('Permission Denied'));
+     }
+ 
+@@ -2057,11 +2088,20 @@ sub DeleteValueForObject {
+ 
+     if (my $id = $args{'Id'}) {
+         $oldval->Load($id);
++
++        if ( $oldval->id
++            && !(  $oldval->__Value('CustomField') == $self->Id
++                && $oldval->__Value('ObjectType') eq ref($obj)
++                && $oldval->__Value('ObjectId') == $obj->Id ) )
++        {
++            return ( 0,
++                $self->loc( "Custom field value [_1] could not be found for custom field [_2]", $id, $self->Name ) );
++        }
+     }
+     unless ($oldval->id) { 
+         $oldval->LoadByObjectContentAndCustomField(
+-            Object => $args{'Object'}, 
+-            Content =>  $args{'Content'}, 
++            Object => $obj,
++            Content =>  $args{'Content'},
+             CustomField => $self->Id,
+         );
+     }
+diff --git a/lib/RT/ObjectCustomFieldValue.pm b/lib/RT/ObjectCustomFieldValue.pm
+index 9a5a30e55..305d2799f 100644
+--- a/lib/RT/ObjectCustomFieldValue.pm
++++ b/lib/RT/ObjectCustomFieldValue.pm
+@@ -808,14 +808,24 @@ sub ExternalStoreDigest {
+ 
+ =head2 CurrentUserCanSee
+ 
+-Returns true if user has "SeeCustomField" on the associated CustomField
+-object, otherwise false.
++Returns true if the user has "SeeCustomField" on the associated CustomField
++object and can see the object the value is attached to, otherwise false.
+ 
+ =cut
+ 
+ sub CurrentUserCanSee {
+     my $self = shift;
+-    return $self->CustomFieldObj->CurrentUserHasRight('SeeCustomField');
++    return undef unless $self->Id;
++
++    return 1 if $self->CurrentUser->Id == RT->SystemUser->Id;
++
++    return 0 unless $self->CustomFieldObj->CurrentUserHasRight('SeeCustomField');
++
++    my $object = $self->Object;
++    return 0 unless $object && $object->id;
++    return 1 if $object->isa('RT::User');
++    return 1 unless $object->can('CurrentUserCanSee');
++    return $object->CurrentUserCanSee ? 1 : 0;
+ }
+ 
+ sub _Value {
+@@ -825,7 +835,8 @@ sub _Value {
+     unless ( $self->CurrentUserCanSee ) {
+         $RT::Logger->debug(
+             "Permission denied. User #". $self->CurrentUser->id
+-            ." has no SeeCustomField right on CF #". $self->__Value('CustomField')
++            ." can not see value #". $self->id ." of CF #". $self->__Value('CustomField')
++            ." on ". $self->__Value('ObjectType') ." #". $self->__Value('ObjectId')
+         );
+         return undef;
+     }
+
+From b3b1b67129ad1f8cfc27047597886c1e0549e3c2 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Sun, 30 Aug 2026 07:56:55 -0400
+Subject: [PATCH 2/2] Do not alter passed in Object in
+ ProcessObjectCustomFieldUpdates
+
+When custom field updates for multiple tickets are submitted, previously the
+passed in Object might load a different ticket, which is wrong as the passed
+in Object is not expected to be changed.
+
+(cherry picked from commit 907767fb201724687ecbc415d764dcf482e354d6)
+CVE: CVE-2026-108274
+
+diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
+index 7737678b1..faeb51257 100644
+--- a/lib/RT/Interface/Web.pm
++++ b/lib/RT/Interface/Web.pm
+@@ -3206,7 +3206,9 @@ sub ProcessObjectCustomFieldUpdates {
+         foreach my $id ( keys %{ $custom_fields_to_mod{$class} } ) {
+             my $Object = $args{'Object'};
+             $Object = $class->new( $session{'CurrentUser'} )
+-                unless $Object && ref $Object eq $class;
++                unless $Object
++                    && ref $Object eq $class
++                    && ( !$id || ( $Object->id || 0 ) == $id );
+ 
+             # skip if we have no object to update
+             next unless $id || $Object->id;
diff --git a/rt-CVE-2026-108275.patch b/rt-CVE-2026-108275.patch
new file mode 100644
index 0000000..2ae4552
--- /dev/null
+++ b/rt-CVE-2026-108275.patch
@@ -0,0 +1,336 @@
+# CVE-2026-108275: Cross-queue ticket modification and disclosure via CreateTickets scrip action templates
+From 9166507b56b5aedb193ea02b89678e4465114396 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Fri, 14 Aug 2026 14:00:31 -0400
+Subject: [PATCH] Narrow change scope for queue-level CreateTickets templates
+
+Queue admins might be given ModifyTemplate and ModifyScrips rights
+to allow them to edit queue-level templates in their queues.
+The CreateTickets action also uses templates, so these admins
+could also create a template and use it in a CreateTickets
+action.
+
+Limit the scope of changes allowed from a queue-level template
+created with type Simple to just the queue it is created within.
+
+To create CreateTickets actions with wider scope in RT or with
+dynamic Perl code, a user needs ExecuteCode to use a Perl template.
+
+(cherry picked from commit 097e9540728623b895b6ac5238243e1c522c4681)
+CVE: CVE-2026-108275
+
+Backport: docs/UPGRADING-5.0 hunk dropped. ParseFields keeps the 4.4 field
+splitting (4.4 CreateTickets has no custom role fields). The 5.0-only
+RT::StaticUtil::RequireModule is replaced with ->require.
+
+diff --git a/lib/RT/Action/CreateTickets.pm b/lib/RT/Action/CreateTickets.pm
+index f20797323..08873adbb 100644
+--- a/lib/RT/Action/CreateTickets.pm
++++ b/lib/RT/Action/CreateTickets.pm
+@@ -238,6 +238,32 @@ When parsed, field names are converted to lowercase and have hyphens stripped.
+ C<Refers-To>, C<RefersTo>, C<refersto>, C<refers-to> and C<r-e-f-er-s-tO> will
+ all be treated as the same thing.
+ 
++=head2 Rights
++
++There are several rights that manage who can create and modify templates
++that can be used with CreateTickets.
++
++It is possible to give a user C<ModifyTemplate> and C<ModifyScrips> at the
++queue level, allowing them to manage their own queue. This configuration is
++most commonly used to allow queue-level admins to create and modify templates
++used for email, but it can allow them to create templates for CreateTickets
++also.
++
++With these queue-level rights, and access to Simple type templates only,
++queue-level admins can configure templates that create and update tickets
++only in that same queue. They also cannot add code as shown in the examples
++above, just static values. This is unlikely to be very useful for most
++scenarios where CreateTickets is used, like automatically creating a ticket
++in another queue based on some event. To get the most out of CreateTickets,
++a user with more rights will typically need to set them up.
++
++A C<SuperUser> or a user with the C<ExecuteCode> right is able to use Perl
++templates and add Perl code directly to the template sections, as shown
++in the examples above. Note that granting C<ExecuteCode> is a powerful right
++that allows users to run any code on the server, including writing code to
++run in scrip conditions and actions. As such, setting up CreateTickets
++actions is usually done by admins with these privileges.
++
+ =head1 METHODS
+ 
+ =cut
+@@ -631,52 +657,9 @@ sub ParseLines {
+ 
+     my $TicketObj ||= RT::Ticket->new( $self->CurrentUser );
+ 
+-    my %args;
+-    my %original_tags;
+-    my @lines = ( split( /\n/, $content ) );
+-    while ( defined( my $line = shift @lines ) ) {
+-        if ( $line =~ /^(.*?):(?:\s+)(.*?)(?:\s*)$/ ) {
+-            my $value = $2;
+-            my $original_tag = $1;
+-            my $tag   = lc($original_tag);
+-            $tag =~ s/-//g;
+-            $tag =~ s/^(requestor|cc|admincc)s?$/$1/i;
+-
+-            $original_tags{$tag} = $original_tag;
+-
+-            if ( ref( $args{$tag} ) )
+-            {    #If it's an array, we want to push the value
+-                push @{ $args{$tag} }, $value;
+-            } elsif ( defined( $args{$tag} ) )
+-            {    #if we're about to get a second value, make it an array
+-                $args{$tag} = [ $args{$tag}, $value ];
+-            } else {    #if there's nothing there, just set the value
+-                $args{$tag} = $value;
+-            }
+-
+-            if ( $tag =~ /^content$/i ) {    #just build up the content
+-                                          # convert it to an array
+-                $args{$tag} = defined($value) ? [ $value . "\n" ] : [];
+-                while ( defined( my $l = shift @lines ) ) {
+-                    last if ( $l =~ /^ENDOFCONTENT\s*$/ );
+-                    push @{ $args{'content'} }, $l . "\n";
+-                }
+-            } else {
+-                # if it's not content, strip leading and trailing spaces
+-                if ( $args{$tag} ) {
+-                    $args{$tag} =~ s/^\s+//g;
+-                    $args{$tag} =~ s/\s+$//g;
+-                }
+-                if (
+-                    ($tag =~ /^(requestor|cc|admincc)(group)?$/i
+-                        or grep {lc $_ eq $tag} keys %RT::Link::TYPEMAP)
+-                    and $args{$tag} =~ /,/
+-                ) {
+-                    $args{$tag} = [ split /,\s*/, $args{$tag} ];
+-                }
+-            }
+-        }
+-    }
++    my ( $args, $original_tags ) = $self->ParseFields($content);
++    my %args          = %$args;
++    my %original_tags = %$original_tags;
+ 
+     foreach my $date (qw(due starts started resolved)) {
+         my $dateobj = RT::Date->new( $self->CurrentUser );
+@@ -780,6 +763,74 @@ sub ParseLines {
+ }
+ 
+ 
++=head2 ParseFields CONTENT
++
++Parses the C<Field: value> lines of a single template block, as produced by
++L</Parse>, into the fields the directive will act on.
++
++Field names are lowercased and have hyphens stripped, so C<Queue>, C<queue>
++and C<QUEUE> are all the C<queue> field. A field named more than once becomes
++an arrayref. A C<Content> field takes every following line up to
++C<ENDOFCONTENT>, so lines in a ticket's body are not fields.
++
++Returns two hashrefs: the fields, and the original name each was written with.
++
++=cut
++
++sub ParseFields {
++    my $self    = shift;
++    my $content = shift;
++
++    my %args;
++    my %original_tags;
++    my @lines = ( split( /\n/, $content ) );
++    while ( defined( my $line = shift @lines ) ) {
++        if ( $line =~ /^(.*?):(?:\s+)(.*?)(?:\s*)$/ ) {
++            my $value = $2;
++            my $original_tag = $1;
++            my $tag   = lc($original_tag);
++            $tag =~ s/-//g;
++            $tag =~ s/^(requestor|cc|admincc)s?$/$1/i;
++
++            $original_tags{$tag} = $original_tag;
++
++            if ( ref( $args{$tag} ) )
++            {    #If it's an array, we want to push the value
++                push @{ $args{$tag} }, $value;
++            } elsif ( defined( $args{$tag} ) )
++            {    #if we're about to get a second value, make it an array
++                $args{$tag} = [ $args{$tag}, $value ];
++            } else {    #if there's nothing there, just set the value
++                $args{$tag} = $value;
++            }
++
++            if ( $tag =~ /^content$/i ) {    #just build up the content
++                                          # convert it to an array
++                $args{$tag} = defined($value) ? [ $value . "\n" ] : [];
++                while ( defined( my $l = shift @lines ) ) {
++                    last if ( $l =~ /^ENDOFCONTENT\s*$/ );
++                    push @{ $args{'content'} }, $l . "\n";
++                }
++            } else {
++                # if it's not content, strip leading and trailing spaces
++                if ( $args{$tag} ) {
++                    $args{$tag} =~ s/^\s+//g;
++                    $args{$tag} =~ s/\s+$//g;
++                }
++                if (
++                    ($tag =~ /^(requestor|cc|admincc)(group)?$/i
++                        or grep {lc $_ eq $tag} keys %RT::Link::TYPEMAP)
++                    and $args{$tag} =~ /,/
++                ) {
++                    $args{$tag} = [ split /,\s*/, $args{$tag} ];
++                }
++            }
++        }
++    }
++
++    return ( \%args, \%original_tags );
++}
++
+ =head2 _ParseXSVTemplate
+ 
+ Parses a tab or comma delimited template. Should only ever be called by
+diff --git a/lib/RT/Template.pm b/lib/RT/Template.pm
+index c00e44d75..f5b571546 100644
+--- a/lib/RT/Template.pm
++++ b/lib/RT/Template.pm
+@@ -289,6 +289,15 @@ sub Create {
+             if $tmp->id;
+     }
+ 
++    {
++        my ( $ok, $msg ) = $self->CheckCreateTicketsQueue(
++            Queue   => $args{'Queue'},
++            Type    => $args{'Type'},
++            Content => $args{'Content'},
++        );
++        return ( undef, $msg ) unless $ok;
++    }
++
+     my ( $result, $msg ) = $self->SUPER::Create(
+         Content     => $args{'Content'},
+         Queue       => $args{'Queue'},
+@@ -774,9 +783,122 @@ sub SetContent {
+         return ( undef, $self->loc('Permission Denied') );
+     }
+ 
++    # __Value, not Queue and Type, because a user with ModifyTemplate but not
++    # ShowTemplate reads undef from both, which would skip the check entirely.
++    # CurrentUserHasQueueRight below reads the queue the same way.
++    my ( $ok, $msg ) = $self->CheckCreateTicketsQueue(
++        Queue   => $self->__Value('Queue'),
++        Type    => $self->__Value('Type'),
++        Content => $NewContent,
++    );
++    return ( undef, $msg ) unless $ok;
++
+     return $self->_Set( Field => 'Content', Value => $NewContent );
+ }
+ 
++=head2 CheckCreateTicketsQueue Queue => ID, Type => TYPE, Content => CONTENT
++
++Confines the C<===Create-Ticket:> and C<===Update-Ticket:> directives of a
++queue-specific template to that template's own queue.
++
++L<RT::Action::CreateTickets> runs as the system user, so a directive naming
++another queue, or a ticket by id in another queue, would otherwise act outside
++the queue whose C<ModifyTemplate> right allowed the template to be written.
++
++C<ModifyTemplate> granted globally is already permission to act on every queue, so
++a user who holds it is exempt, as are global templates, which require it to
++write. C<Perl> templates are exempt because if a user has C<ExecuteCode>, they
++can modify any other objects in Perl code.
++
++The check therefore applies only to a user whose C<ModifyTemplate> is limited to
++particular queues and is using Simple type templates.
++
++Returns a status, and a message when the check fails.
++
++=cut
++
++sub CheckCreateTicketsQueue {
++    my $self = shift;
++    my %args = (
++        Queue   => undef,
++        Type    => undef,
++        Content => undef,
++        @_
++    );
++
++    # A global template has a Queue of 0, and is not confined to any queue.
++    # Callers must read Queue in a way that doesn't depend on the current user's
++    # rights, or a user who can't read the template skips the check entirely.
++    return (1) unless $args{'Queue'};
++    return (1) if ( $args{'Type'} // '' ) eq 'Perl';
++    return (1)
++        if $self->CurrentUser->HasRight( Object => RT->System, Right => 'ModifyTemplate' );
++
++    my $content = $args{'Content'};
++    return (1) unless defined $content && length $content;
++
++    # Hand RT::Action::CreateTickets->Parse only what it can parse. Anything
++    # else makes it log an error for every ordinary template that is saved.
++    return (1)
++        unless substr( $content, 0, 3 ) eq '==='
++        or $content =~ /(?:\t|,)/;
++
++    my $queue = RT::Queue->new( RT->SystemUser );
++    $queue->Load( $args{'Queue'} );
++    return ( 0, $self->loc('Invalid queue') ) unless $queue->id;
++
++    RT::Action::CreateTickets->require
++        or return ( 0, $self->loc('Could not load the CreateTickets action') );
++
++    # Parse with the action itself, and read the fields of each directive with
++    # the same method the action reads them with when it runs, so this check and
++    # the directives it is checking cannot drift apart. A non-Perl template is
++    # parsed without interpolation, so every value here is the literal value
++    # that will be used.
++    my $action = RT::Action::CreateTickets->new( CurrentUser => $self->CurrentUser );
++    $action->Parse( Content => $content );
++
++    my $denied = $self->loc(
++        "A template in the [_1] queue can only create or update tickets in that queue. Contact your RT admin for additional rights.",
++        $queue->Name );
++
++    my @targets = ( @{ $action->{'create_tickets'} || [] },
++                    @{ $action->{'update_tickets'} || [] } );
++
++    for my $target (@targets) {
++        my $directives = $action->{'templates'}->{$target};
++        next unless defined $directives;
++
++        my ($fields) = $action->ParseFields($directives);
++        my $value = $fields->{'queue'};
++        next unless defined $value;
++
++        # Naming a field twice yields every value it was given.
++        for my $name ( ref $value eq 'ARRAY' ? @$value : $value ) {
++            # An empty Queue sets nothing, and creating without one fails.
++            next unless defined $name && length $name;
++
++            my $target_queue = RT::Queue->new( RT->SystemUser );
++            $target_queue->Load($name);
++            return ( 0, $denied )
++                unless $target_queue->id and $target_queue->id == $queue->id;
++        }
++    }
++
++    # An update names its target by id, which has to be in this queue too.
++    for my $target ( @{ $action->{'update_tickets'} || [] } ) {
++        my ($id) = $target =~ /^update-(\d+)/;
++        next unless $id;
++
++        my $ticket = RT::Ticket->new( RT->SystemUser );
++        $ticket->LoadById($id);
++        return ( 0, $denied )
++            unless $ticket->id and $ticket->Queue == $queue->id;
++    }
++
++    return (1);
++}
++
+ sub _UpdateAttributes {
+     my $self = shift;
+     my %args = (
diff --git a/rt-CVE-2026-108276.patch b/rt-CVE-2026-108276.patch
new file mode 100644
index 0000000..6f2d3d7
--- /dev/null
+++ b/rt-CVE-2026-108276.patch
@@ -0,0 +1,104 @@
+# CVE-2026-108276: Information disclosure via REST 1.0 group endpoint
+From 8f4d5ffebbf665b3496fc7bbdc07a5e1a7f67392 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Thu, 13 Aug 2026 14:17:43 -0400
+Subject: [PATCH 1/3] Require rights to show or modify a group over REST/1.0
+
+Forms/group/default and Forms/group/customfields checked no rights at all.
+Require SeeGroup to show and AdminGroup to modify.
+
+(cherry picked from commit 4572df9824f52c3fa4ccce2ef3b6fe9e2ad910e1)
+CVE: CVE-2026-108276
+
+diff --git a/share/html/REST/1.0/Forms/group/customfields b/share/html/REST/1.0/Forms/group/customfields
+index c2af83523..5f081cd9a 100644
+--- a/share/html/REST/1.0/Forms/group/customfields
++++ b/share/html/REST/1.0/Forms/group/customfields
+@@ -60,6 +60,8 @@ my $group = RT::Group->new($session{CurrentUser});
+ $group->Load($id);
+ if (!$group->Id) {
+     return [ "# Group $id does not exist.", [], {}, 1 ];
++} elsif ( !$group->CurrentUserHasRight('SeeGroup') ) {
++    return [ "# You are not allowed to display group $id.", [], {}, 1 ];
+ }
+ 
+ if (%$changes) {
+diff --git a/share/html/REST/1.0/Forms/group/default b/share/html/REST/1.0/Forms/group/default
+index cfa9ba540..6627c0790 100644
+--- a/share/html/REST/1.0/Forms/group/default
++++ b/share/html/REST/1.0/Forms/group/default
+@@ -70,6 +70,12 @@ if ($id ne 'new') {
+     $group->Load($id);
+     if (!$group->Id) {
+         return [ "# Group $id does not exist.", [], {}, 1 ];
++    } elsif (%data) {
++        if ( !$group->CurrentUserHasRight('AdminGroup') ) {
++            return [ "# You are not allowed to modify group $id.", [], {}, 1 ];
++        }
++    } elsif ( !$group->CurrentUserHasRight('SeeGroup') ) {
++        return [ "# You are not allowed to display group $id.", [], {}, 1 ];
+     }
+ }
+ else {
+
+From 7f6f483f79984ce00351b2577e6f7befb1b9c48d Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Thu, 13 Aug 2026 15:03:38 -0400
+Subject: [PATCH 2/3] Report a group that is not visible as missing in REST/1.0
+ name lookup
+
+Forms/group/ns guarded on $groups->Count, a plain SQL count, then
+dereferenced $groups->Next. RT::Groups::AddRecord applies the SeeGroup
+check as the collection is built, so the count does not promise a record.
+Take the record first and report the name as unused when there is none.
+
+(cherry picked from commit 7ea19fe157ef719a8190bb8800b9a714d128f272)
+CVE: CVE-2026-108276
+
+diff --git a/share/html/REST/1.0/Forms/group/ns b/share/html/REST/1.0/Forms/group/ns
+index 11133f57c..5e92ec395 100644
+--- a/share/html/REST/1.0/Forms/group/ns
++++ b/share/html/REST/1.0/Forms/group/ns
+@@ -55,8 +55,9 @@ use RT::Groups;
+ 
+ my $groups = RT::Groups->new($session{CurrentUser});
+ $groups->Limit(FIELD => 'Name', OPERATOR => '=', VALUE => $id, CASESENSITIVE => 0);
+-if ($groups->Count == 0) {
++my $group = $groups->Next;
++if ( !$group ) {
+     return (0, "No group named $id exists.");
+ }
+-return $groups->Next->Id;
++return $group->Id;
+ </%perl>
+
+From 420a3197d7d349a77b8d4ead3ba63014a0d26b3d Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Wed, 26 Aug 2026 14:47:45 -0400
+Subject: [PATCH 3/3] Report a queue that is not visible as missing in REST/1.0
+ name lookup
+
+Forms/queue/ns guarded on $queues->Count, a plain SQL count, then
+dereferenced $queues->Next. RT::Queues::AddRecord applies the SeeQueue
+check as the collection is built, so the count does not promise a record.
+Take the record first and report the name as unused when there is none.
+
+(cherry picked from commit 417ba7ff1681f911cd0d5fa0e47cd6d48868938f)
+CVE: CVE-2026-108276
+
+diff --git a/share/html/REST/1.0/Forms/queue/ns b/share/html/REST/1.0/Forms/queue/ns
+index 2582b9e45..8df5acb3c 100644
+--- a/share/html/REST/1.0/Forms/queue/ns
++++ b/share/html/REST/1.0/Forms/queue/ns
+@@ -55,8 +55,9 @@ use RT::Queues;
+ 
+ my $queues = RT::Queues->new($session{CurrentUser});
+ $queues->Limit(FIELD => 'Name', OPERATOR => '=', VALUE => $id, CASESENSITIVE => 0 );
+-if ($queues->Count == 0) {
++my $queue = $queues->Next;
++if ( !$queue ) {
+     return (0, "No queue named $id exists.");
+ }
+-return $queues->Next->Id;
++return $queue->Id;
+ </%perl>
diff --git a/rt-CVE-2026-108278.patch b/rt-CVE-2026-108278.patch
new file mode 100644
index 0000000..12924be
--- /dev/null
+++ b/rt-CVE-2026-108278.patch
@@ -0,0 +1,60 @@
+# CVE-2026-108278: Information disclosure via RSS feed URLs that do not bind their signed search
+From 1f9c0aff96568fe6c5215206c254b5d5975c6f52 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Mon, 17 Aug 2026 08:13:10 -0400
+Subject: [PATCH] Make RSS feeds run only the search their URL is signed for
+
+The auth string in a feed URL did not fully determine the search the handler
+ran, so a caller could influence it. Take the search arguments from the
+shortener when the URL carries one, and otherwise require the sort arguments
+to look like sort arguments.
+
+Signing the arguments unambiguously would be sturdier, but would invalidate
+feed URLs already in use.
+
+Backport: RT 4.4 has no URL shortener, so only the sort argument check
+and the restriction of the arguments passed to ResultsRSSView apply.
+Arguments the URL does not carry are not passed, so ResultsRSSView keeps
+its own Order/OrderBy defaults as before.
+
+CVE: CVE-2026-108278
+
+(cherry picked from commit 6865a132bdc96ad02897c4439f97c075453c89be)
+
+diff --git a/share/html/NoAuth/rss/dhandler b/share/html/NoAuth/rss/dhandler
+index e5e233737..ba8581fc4 100644
+--- a/share/html/NoAuth/rss/dhandler
++++ b/share/html/NoAuth/rss/dhandler
+@@ -71,6 +71,23 @@ my $user = RT::User->new(RT->SystemUser);
+ $user->Load($name);
+ $notfound->("Invalid user: $user") unless $user->id;
+ 
++my @search_args = qw(Query Order OrderBy);
++
++# The auth string covers Query, Order and OrderBy as one concatenation, so it
++# does not pin down where each one ends. Whatever a caller trims off the Query
++# lands at the start of the next argument, so requiring that one to look like
++# a sort argument keeps the split where it was signed.
++my %sort_format = (
++    Order   => qr{^(?:ASC|DESC)?$}i,
++    OrderBy => qr{^[\w.]*(?:\{[^{}]*\}[\w.]*)*$},
++);
++
++for my $arg (qw(Order OrderBy)) {
++    next unless defined $ARGS{$arg} && length $ARGS{$arg};
++    $notfound->("Invalid $arg: $ARGS{$arg}") if grep { !/$sort_format{$arg}/ } split /\|/, $ARGS{$arg};
++    last;
++}
++
+ $notfound->("Invalid authstring")
+   unless $user->ValidateAuthString( $auth,
+           $ARGS{Query} . $ARGS{Order} . $ARGS{OrderBy} );
+@@ -79,5 +96,7 @@ my $cu = RT::CurrentUser->new;
+ $cu->Load($user);
+ local $session{'CurrentUser'} = $cu;
+ 
+-$m->comp("/Search/Elements/ResultsRSSView", %ARGS);
++my %search = map { $_ => $ARGS{$_} } grep { defined $ARGS{$_} } @search_args;
++
++$m->comp("/Search/Elements/ResultsRSSView", %search);
+ </%init>
diff --git a/rt-CVE-2026-108280.patch b/rt-CVE-2026-108280.patch
new file mode 100644
index 0000000..e731a0a
--- /dev/null
+++ b/rt-CVE-2026-108280.patch
@@ -0,0 +1,110 @@
+# CVE-2026-108280: Missing object-level authorization on queue, catalog, custom field, and article class administration pages
+From c85190a12dd984ecc484934dbf2df10fcc72ed4e Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Mon, 17 Aug 2026 04:52:04 -0400
+Subject: [PATCH] Check object-level admin rights on admin pages that write
+ attributes
+
+Default values and article class include settings are stored as attributes,
+and attribute writes are unguarded, so these settings could be changed on
+objects the user holds no admin rights on.
+
+(cherry picked from commit 3b7e6f7f9a8353d0da5dc77fa1c27e724113e948)
+
+CVE: CVE-2026-108280
+
+Backport: RT 4.4 Admin/Articles/Classes/Modify.html has no $skip_update,
+so the new AdminClass check wraps the 4.4 "$ClassObj->id && $Submitted"
+block. t/web/admin_attribute_acl.t added for RT 4.4.
+
+diff --git a/share/html/Admin/Articles/Classes/Modify.html b/share/html/Admin/Articles/Classes/Modify.html
+index 0d7b16c93..7b21fafdb 100644
+--- a/share/html/Admin/Articles/Classes/Modify.html
++++ b/share/html/Admin/Articles/Classes/Modify.html
+@@ -216,18 +216,23 @@ if ( $ClassObj->id ) {
+ }
+ 
+ if  ( $ClassObj->id && $Submitted ) {
+-    if ( $Disabled != $ClassObj->Disabled) {
+-        my  ($code, $msg) = $ClassObj->SetDisabled($Disabled);
+-        push @results, loc('Enabled status [_1]', loc_fuzzy($msg));
+-    }
++    if ( $ClassObj->CurrentUserHasRight('AdminClass') ) {
++        if ( $Disabled != $ClassObj->Disabled) {
++            my  ($code, $msg) = $ClassObj->SetDisabled($Disabled);
++            push @results, loc('Enabled status [_1]', loc_fuzzy($msg));
++        }
+ 
+-    for (keys %include) {
+-        if ($ARGS{"Include-$_"}) {
+-            $ClassObj->DeleteAttribute("Skip-$_");
+-        } else {
+-            $ClassObj->SetAttribute(Name => "Skip-$_", Content => 1);
++        for (keys %include) {
++            if ($ARGS{"Include-$_"}) {
++                $ClassObj->DeleteAttribute("Skip-$_");
++            } else {
++                $ClassObj->SetAttribute(Name => "Skip-$_", Content => 1);
++            }
+         }
+     }
++    else {
++        push @results, loc('Permission Denied');
++    }
+ }
+ 
+ # This code does automatic redirection if any updates happen.
+diff --git a/share/html/Admin/Assets/Catalogs/DefaultValues.html b/share/html/Admin/Assets/Catalogs/DefaultValues.html
+index 4a4b98f45..434943a71 100644
+--- a/share/html/Admin/Assets/Catalogs/DefaultValues.html
++++ b/share/html/Admin/Assets/Catalogs/DefaultValues.html
+@@ -69,6 +69,9 @@
+ my $catalog = RT::Catalog->new( $session{CurrentUser} );
+ $catalog->Load($id) || Abort( loc( "Couldn't load asset [_1]", $id ) );
+ 
++Abort( loc("Permission Denied"), Code => HTTP::Status::HTTP_FORBIDDEN )
++    unless $catalog->CurrentUserHasRight('AdminCatalog');
++
+ my $title = loc( 'Default Values for catalog [_1]', $catalog->Name );
+ 
+ my @results;
+diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
+index 395cf515f..89191bf81 100644
+--- a/share/html/Admin/CustomFields/Modify.html
++++ b/share/html/Admin/CustomFields/Modify.html
+@@ -329,11 +329,16 @@ if ( $ARGS{'Update'} && $id ne 'new' ) {
+     }
+ 
+     if ( $CustomFieldObj->SupportDefaultValues ) {
+-        my ($ret, $msg) = $CustomFieldObj->SetDefaultValues(
+-            Object => RT->System,
+-            Values => $ARGS{'Default-' . $CustomFieldObj->id . '-Value'} // $ARGS{'Default-' . $CustomFieldObj->id . '-Values'},
+-        );
+-        push @results, $msg;
++        if ( $CustomFieldObj->CurrentUserHasRight('AdminCustomField') ) {
++            my ($ret, $msg) = $CustomFieldObj->SetDefaultValues(
++                Object => RT->System,
++                Values => $ARGS{'Default-' . $CustomFieldObj->id . '-Value'} // $ARGS{'Default-' . $CustomFieldObj->id . '-Values'},
++            );
++            push @results, $msg;
++        }
++        else {
++            push @results, loc('Permission Denied');
++        }
+     }
+ 
+     my $paramtag = "CustomField-". $CustomFieldObj->Id ."-Value";
+diff --git a/share/html/Admin/Queues/DefaultValues.html b/share/html/Admin/Queues/DefaultValues.html
+index ac8fbdb5e..708da9b94 100644
+--- a/share/html/Admin/Queues/DefaultValues.html
++++ b/share/html/Admin/Queues/DefaultValues.html
+@@ -146,6 +146,9 @@
+ my $queue = RT::Queue->new( $session{CurrentUser} );
+ $queue->Load($id) || Abort( loc( "Couldn't load object [_1]", $id ) );
+ 
++Abort( loc("Permission Denied"), Code => HTTP::Status::HTTP_FORBIDDEN )
++    unless $queue->CurrentUserHasRight('AdminQueue');
++
+ my $title = loc( 'Default Values for queue [_1]', $queue->Name );
+ 
+ my @results;
diff --git a/rt-CVE-2026-108281.patch b/rt-CVE-2026-108281.patch
new file mode 100644
index 0000000..69072da
--- /dev/null
+++ b/rt-CVE-2026-108281.patch
@@ -0,0 +1,110 @@
+# CVE-2026-108281: Missing authorization on scrip and custom field administration pages allows reordering and stage changes
+From 3d6d04e7ede204ecdc9f619bc1c59d57f56599c4 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Mon, 17 Aug 2026 07:28:55 -0400
+Subject: [PATCH 1/3] Require ModifyScrips to reorder scrips
+
+(cherry picked from commit ee90d1f40cc52d4d622c4d4c86e317f24b74f087)
+
+CVE: CVE-2026-108281
+
+diff --git a/share/html/Admin/Global/Scrips.html b/share/html/Admin/Global/Scrips.html
+index 54c80a87e..22d2288dd 100644
+--- a/share/html/Admin/Global/Scrips.html
++++ b/share/html/Admin/Global/Scrips.html
+@@ -52,6 +52,11 @@
+ <%init>
+ my $title = loc("Modify scrips which apply to all queues");
+ my (@actions);
++
++if ( $ARGS{MoveScripUp} || $ARGS{MoveScripDown} ) {
++    Abort( loc("Permission Denied"), Code => HTTP::Status::HTTP_FORBIDDEN )
++        unless $session{CurrentUser}->HasRight( Object => RT->System, Right => 'ModifyScrips' );
++}
+ </%init>
+ <%ARGS>
+ $id => 0
+diff --git a/share/html/Admin/Queues/Scrips.html b/share/html/Admin/Queues/Scrips.html
+index abde5141c..ed0566803 100644
+--- a/share/html/Admin/Queues/Scrips.html
++++ b/share/html/Admin/Queues/Scrips.html
+@@ -53,6 +53,11 @@ my $QueueObj = RT::Queue->new($session{'CurrentUser'});
+ $QueueObj->Load($id);
+ Abort(loc("Queue [_1] not found",$id)) unless $QueueObj->id;
+ 
++if ( $ARGS{MoveScripUp} || $ARGS{MoveScripDown} ) {
++    Abort( loc("Permission Denied"), Code => HTTP::Status::HTTP_FORBIDDEN )
++        unless $QueueObj->CurrentUserHasRight('ModifyScrips');
++}
++
+ my $title = loc("Modify scrips for queue [_1]", $QueueObj->Name);
+ </%init>
+ 
+
+From e5671f903519497431cfb39912ab9bb1b24ed73d Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Mon, 17 Aug 2026 07:28:55 -0400
+Subject: [PATCH 2/3] Check AssignCustomFields for globally applied custom
+ fields
+
+$id=0 means globally applied custom fields, which occurs on admin global
+custom field pages.
+
+(cherry picked from commit 7d5b51faa1a683cc8566370ff4603fbbd19d5d3a)
+
+CVE: CVE-2026-108281
+
+diff --git a/share/html/Admin/Elements/EditCustomFields b/share/html/Admin/Elements/EditCustomFields
+index 98f39c4ed..af930a91b 100644
+--- a/share/html/Admin/Elements/EditCustomFields
++++ b/share/html/Admin/Elements/EditCustomFields
+@@ -91,7 +91,7 @@
+ 
+ <%INIT>
+ my $id = $Object->Id || 0;
+-if ($id and !$Object->CurrentUserHasRight('AssignCustomFields')) {
++if (!$Object->CurrentUserHasRight('AssignCustomFields')) {
+     $m->out('<p><i>', loc('(No custom fields)'), '</i></p>');
+     return;
+ }
+
+From d0ceaa78674bebdd2f6e717505aad7c2d319bb16 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Fri, 21 Aug 2026 14:16:50 -0400
+Subject: [PATCH 3/3] Require ModifyScrips to change the stage of a global
+ scrip
+
+The stage of a globally applied scrip lives on the RT::ObjectScrip record,
+which adds no rights checking of its own and inherits _Set from RT::Record,
+so the stage could be changed without the right that applying and unapplying
+the scrip requires. Check ModifyScrips on the system, which is what
+AddToObject does for a global application.
+
+(cherry picked from commit fd9728b5b1370c9baafc46a1d538fe5bb0960c4d)
+
+CVE: CVE-2026-108281
+
+Backport: t/web/admin_reorder_acl.t added for RT 4.4 (upstream shipped no
+test); it covers this commit and the two scrip/custom field reorder
+commits before it.
+
+diff --git a/share/html/Admin/Scrips/Objects.html b/share/html/Admin/Scrips/Objects.html
+index 1578ca4cf..d688e61b5 100644
+--- a/share/html/Admin/Scrips/Objects.html
++++ b/share/html/Admin/Scrips/Objects.html
+@@ -149,8 +149,13 @@ if ( $Update ) {
+         }
+     }
+     if ($global and $global->Stage ne $Stage) {
+-        my ($status, $msg) = $global->SetStage($Stage);
+-        push @results, $msg;
++        if ( $session{'CurrentUser'}->HasRight( Object => RT->System, Right => 'ModifyScrips' ) ) {
++            my ($status, $msg) = $global->SetStage($Stage);
++            push @results, $msg;
++        }
++        else {
++            push @results, loc('Permission Denied');
++        }
+     }
+     MaybeRedirectForResults(
+         Actions   => \@results,
diff --git a/rt-CVE-2026-108282.patch b/rt-CVE-2026-108282.patch
new file mode 100644
index 0000000..d1a9d4c
--- /dev/null
+++ b/rt-CVE-2026-108282.patch
@@ -0,0 +1,319 @@
+# CVE-2026-108282: Insecure direct object reference in saved search handling allows modifying other users' settings
+From 96f28d7f544bcb9fce7440174527287193bae59d Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Wed, 12 Aug 2026 07:25:48 -0400
+Subject: [PATCH 1/2] Bind saved search privacy to the attribute it names
+
+This ensures that the two key components (privacy and id) within saved
+search identifiers like RT::User-5-SavedSearch-12 always remain consistent.
+
+For RT's built-in "Search - <name>" saved searches, everyone still sees
+them, but only SuperUser can change or delete them.
+
+(cherry picked from commit 82093b255f5a965cee669021dae5feba5107f76b)
+
+CVE: CVE-2026-108282
+
+Backport: RT 4.4 EditSearches lacked the "Reload to refresh $obj->Object"
+line next to the new SavedSearch id rebuild; it is taken from upstream
+since the new code reads the moved attribute. t/web/saved_search_idor.t
+added for RT 4.4.
+
+diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
+index 5f32b8a52..e0e350c47 100644
+--- a/lib/RT/Attribute.pm
++++ b/lib/RT/Attribute.pm
+@@ -116,6 +116,11 @@ sub LookupObjectRight {
+         return $right if $right;
+     }
+ 
++    # RT's built-in searches: shown to everyone, shared by everyone
++    if ( ( $args{'Name'} // '' ) =~ /^Search - / ) {
++        return ( $args{'Right'} // '' ) eq 'display' ? 'allow' : 'SuperUser';
++    }
++
+     # if it's an attribute on oneself, check the personal acl map
+     if (($args{'ObjectType'} eq 'RT::User') && ($args{'ObjectId'} eq $self->CurrentUser->Id)) {
+     return('allow') unless ($PERSONAL_ACL_MAP->{$args{'Name'}});
+diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
+index faeb51257..279567924 100644
+--- a/lib/RT/Interface/Web.pm
++++ b/lib/RT/Interface/Web.pm
+@@ -4584,7 +4584,7 @@ Instantiate container object for saving searches.
+ 
+ sub _load_container_object {
+     my ( $obj_type, $obj_id ) = @_;
+-    return RT::SavedSearch->new( $session{'CurrentUser'} )->_load_privacy_object( $obj_type, $obj_id );
++    return RT::SavedSearch->new( $session{'CurrentUser'} )->_GetObject("$obj_type-$obj_id");
+ }
+ 
+ =head2 _parse_saved_search ( $arg );
+@@ -4604,7 +4604,28 @@ sub _parse_saved_search {
+     my $obj_id    = $2;
+     my $search_id = $3;
+ 
+-    return ( _load_container_object( $obj_type, $obj_id ), $search_id );
++    my $container = _load_container_object( $obj_type, $obj_id );
++    return unless $container && $container->Id;
++
++    my $search = RT::Attribute->new( RT->SystemUser );
++    $search->LoadByCols(
++        id         => $search_id,
++        ObjectType => ref($container),
++        ObjectId   => $container->Id,
++    );
++
++    unless ( $search->Id ) {
++        RT->Logger->debug("Attribute $search_id is not stored on $obj_type-$obj_id");
++        return;
++    }
++
++    my $name = $search->Name // '';
++    unless ( $name eq 'SavedSearch' || $name =~ /^Search - / ) {
++        RT->Logger->debug("Attribute $search_id is not a saved search");
++        return;
++    }
++
++    return ( $container, $search_id );
+ }
+ 
+ =head2 ScrubHTML content
+diff --git a/lib/RT/SavedSearch.pm b/lib/RT/SavedSearch.pm
+index 16d9f4983..1fcb3a1c5 100644
+--- a/lib/RT/SavedSearch.pm
++++ b/lib/RT/SavedSearch.pm
+@@ -84,6 +84,21 @@ sub PostLoad {
+     $self->{'Type'} = $self->{'Attribute'}->SubValue('SearchType');
+ }
+ 
++=head2 PostLoadValidate
++
++Ensure that the ID corresponds to an actual saved search, since it's all
++attributes under the hood. RT's built-in searches are named C<Search - I<name>>
++rather than C<SavedSearch>, so they count too.
++
++=cut
++
++sub PostLoadValidate {
++    my $self = shift;
++    my $name = $self->{'Attribute'}->__Value('Name') // '';
++    return ( 0, "Invalid object type" ) unless $name eq 'SavedSearch' || $name =~ /^Search - /;
++    return 1;
++}
++
+ sub SaveAttribute {
+     my $self   = shift;
+     my $object = shift;
+diff --git a/lib/RT/SharedSetting.pm b/lib/RT/SharedSetting.pm
+index 69cbb87fe..1f980a31e 100644
+--- a/lib/RT/SharedSetting.pm
++++ b/lib/RT/SharedSetting.pm
+@@ -102,19 +102,32 @@ sub Load {
+     my ($privacy, $id) = @_;
+     my $object = $self->_GetObject($privacy);
+ 
+-    if ($object) {
+-        $self->{'Attribute'} = RT::Attribute->new($self->CurrentUser);
+-        $self->{'Attribute'}->Load( $id );
+-        if ($self->{'Attribute'}->Id) {
+-            $self->{'Id'} = $self->{'Attribute'}->Id;
+-            $self->{'Privacy'} = $privacy;
+-            $self->PostLoad();
+-
+-            return wantarray ? (0, $self->loc("Permission Denied")) : 0
+-                unless $self->CurrentUserCanSee;
++    if ( $object && $object->Id ) {
++        my $attribute = RT::Attribute->new( $self->CurrentUser );
++        $attribute->Load($id);
++        if ( $attribute->Id ) {
++            unless ( ( $attribute->__Value('ObjectType') // '' ) eq ref($object)
++                && ( $attribute->__Value('ObjectId') // 0 ) == $object->Id )
++            {
++                RT->Logger->warning("Attribute $id is not stored on object $privacy");
++                return wantarray ? ( 0, $self->loc("Permission Denied") ) : 0;
++            }
++
++            $self->{'Attribute'} = $attribute;
++            $self->{'Id'}        = $attribute->Id;
++            $self->{'Privacy'}   = $self->_build_privacy($object);
++
++            # The checks need the attribute in place, so on failure put it back
++            # out of reach of callers that ignore us
++            my ( $ok, $msg ) = $self->CurrentUserCanSee ? $self->PostLoadValidate : ( 0, 'Permission Denied' );
++
++            if ( !$ok ) {
++                delete $self->{$_} for qw/Attribute Privacy/;
++                $self->{'Id'} = 0;
++                return wantarray ? ( $ok, $self->loc($msg) ) : $ok;
++            }
+ 
+-            my ($ok, $msg) = $self->PostLoadValidate;
+-            return wantarray ? ($ok, $msg) : $ok if !$ok;
++            $self->PostLoad();
+ 
+             return wantarray ? (1, $self->loc("Loaded [_1] [_2]", $self->ObjectName, $self->Name)) : 1;
+         } else {
+@@ -200,7 +213,9 @@ sub Save {
+     my $object  = $self->_GetObject($privacy);
+ 
+     return (0, $self->loc("Failed to load object for [_1]", $privacy))
+-        unless $object;
++        unless $object && $object->Id;
++
++    $privacy = $self->_build_privacy($object);
+ 
+     return (0, $self->loc("Permission Denied"))
+         unless $self->CurrentUserCanCreate($privacy);
+@@ -286,6 +301,8 @@ where status is true upon success.
+ 
+ sub Delete {
+     my $self = shift;
++    return ( 0, $self->loc( "No [_1] loaded", $self->ObjectName ) ) unless $self->Id;
++
+     return (0, $self->loc("Permission Denied"))
+         unless $self->CurrentUserCanDelete;
+ 
+@@ -419,8 +436,17 @@ sub _GetObject {
+ 
+     my $object = $self->_load_privacy_object($obj_type, $obj_id);
+ 
++    # _load_privacy_object has already said why it declined
++    return undef unless $object;
++
+     unless (ref($object) eq $obj_type) {
+-        $RT::Logger->error("Could not load object of type $obj_type with ID $obj_id, got object of type " . (ref($object) || 'undef'));
++        RT->Logger->error(
++            "Could not load object of type $obj_type with ID $obj_id, got object of type " . ref($object) );
++        return undef;
++    }
++
++    unless ( $object->Id ) {
++        RT->Logger->debug("Could not load object of type $obj_type with ID $obj_id");
+         return undef;
+     }
+ 
+diff --git a/share/html/Search/Elements/EditSearches b/share/html/Search/Elements/EditSearches
+index a5a45c3b7..3cbb1b382 100644
+--- a/share/html/Search/Elements/EditSearches
++++ b/share/html/Search/Elements/EditSearches
+@@ -254,6 +254,11 @@ elsif ( $ARGS{'SavedSearchDelete'} ) {
+             return @results;
+         }
+     }
++    else {
++        push @results, loc( 'Can not load saved search "[_1]"', $SavedSearch->{'Id'} );
++        return @results;
++    }
++
+     $SavedSearch->{'Id'}          = 'new';
+     $SavedSearch->{'Object'}      = undef;
+     $SavedSearch->{'Description'} = undef;
+@@ -261,6 +266,12 @@ elsif ( $ARGS{'SavedSearchDelete'} ) {
+ }
+ elsif ( $ARGS{'SavedSearchCopy'} ) {
+     my ($container, $id ) = _parse_saved_search( $ARGS{'SavedSearchId'} );
++
++    unless ( $container ) {
++        push @results, loc( 'Can not load saved search "[_1]"', $ARGS{'SavedSearchId'} );
++        return @results;
++    }
++
+     $SavedSearch->{'Object'} = RT::Attribute->new( $session{'CurrentUser'} );
+     $SavedSearch->{'Object'}->Load( $id );
+     if ( $ARGS{'SavedSearchDescription'} && $ARGS{'SavedSearchDescription'} ne $SavedSearch->{'Object'}->Description ) {
+@@ -276,9 +287,12 @@ if ( $SavedSearch->{'Id'} && $SavedSearch->{'Id'} ne 'new'
+      && !$SavedSearch->{'Object'} )
+ {
+     my ($container, $id ) = _parse_saved_search( $ARGS{'SavedSearchId'} );
+-    $SavedSearch->{'Object'} = RT::Attribute->new( $session{'CurrentUser'} );
+-    $SavedSearch->{'Object'}->Load( $id );
+-    $SavedSearch->{'Description'} ||= $SavedSearch->{'Object'}->Description;
++
++    if ( $id ) {
++        $SavedSearch->{'Object'} = RT::Attribute->new( $session{'CurrentUser'} );
++        $SavedSearch->{'Object'}->Load( $id );
++        $SavedSearch->{'Description'} ||= $SavedSearch->{'Object'}->Description;
++    }
+ }
+ 
+ return @results;
+@@ -351,6 +365,11 @@ if ( $obj && $obj->id ) {
+                 push @results, loc( 'Unable to set privacy id: [_1]', $msg )
+                   unless ($val);
+             }
++            # Reload to refresh $obj->Object
++            $obj->Load( $obj->Id );
++
++            my ( $type, $oid ) = ( $obj->__Value('ObjectType'), $obj->__Value('ObjectId') );
++            $SavedSearch->{'Id'} = join '-', $type, $oid, 'SavedSearch', $obj->Id;
+         }
+         else {
+             # two loc are just for convenience so we don't need to
+@@ -377,11 +396,7 @@ elsif ( $id eq 'new' and defined $desc and length $desc ) {
+         $SavedSearch->{'Object'} = RT::Attribute->new( $session{'CurrentUser'} );
+         $SavedSearch->{'Object'}->Load( $saved_search->Id );
+         # Build new SearchId
+-        $SavedSearch->{'Id'} =
+-                ref( $session{'CurrentUser'}->UserObj ) . '-'
+-                    . $session{'CurrentUser'}->UserObj->Id
+-                    . '-SavedSearch-'
+-                    . $SavedSearch->{'Object'}->Id;
++        $SavedSearch->{'Id'} = join '-', $saved_search->Privacy, 'SavedSearch', $saved_search->Id;
+     }
+     else {
+         push @results, loc("Can't find a saved search to work with").': '.loc($msg);
+diff --git a/share/html/Widgets/SavedSearch b/share/html/Widgets/SavedSearch
+index 38b685ad4..ec0520d64 100644
+--- a/share/html/Widgets/SavedSearch
++++ b/share/html/Widgets/SavedSearch
+@@ -135,9 +135,8 @@ if ( $args->{SavedSearchSave} || $args->{SavedSearchCopy} ) {
+         );
+         if ($ok) {
+             $self->{CurrentSearch}{Object} = $saved_search->{Attribute};
+-            $self->{SearchId} = $args->{SavedChartSearchId} = 'RT::User-' .
+-                $session{CurrentUser}->id . '-SavedSearch-' .
+-                $saved_search->Id;
++            $self->{SearchId} = $args->{SavedChartSearchId}
++                = join '-', $saved_search->Privacy, 'SavedSearch', $saved_search->Id;
+             push @actions, loc( '[_1] [_2] saved.', loc($self->{SearchType}), $args->{SavedSearchDescription} );
+         } else {
+             push @actions,
+
+From 85995e9b0f84d509a624d440a92a04909a6d5cf7 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Thu, 27 Aug 2026 16:26:23 -0400
+Subject: [PATCH 2/2] Hide dashboard name/link in saved search dependency list
+ unless visible
+
+(cherry picked from commit 6109b8c29c1932c02feb14457bea440ae6ec44e0)
+
+CVE: CVE-2026-108282 (no advisory names this commit explicitly;
+it shipped with the saved search fixes in 5.0.11)
+
+Backport: RT 4.4 renders the dependency list inline in the delete
+confirmation rather than in a GetDependedOnByList method; the
+CurrentUserCanSee check is applied there to Dashboard entries, and the
+4.4-only homepage entries (Global / User) are kept as they were.
+t/web/saved_search_dependent_dashboard.t added for RT 4.4.
+
+diff --git a/share/html/Search/Elements/EditSearches b/share/html/Search/Elements/EditSearches
+index 3cbb1b382..8e4e26f44 100644
+--- a/share/html/Search/Elements/EditSearches
++++ b/share/html/Search/Elements/EditSearches
+@@ -98,10 +98,16 @@
+       </p>
+       <ul class="saved-search-depended-on-by-list">
+ %     my $links = $Object->DependedOnBy;
++%     my $dashboard = RT::Dashboard->new( $session{CurrentUser} );
+ %     while ( my $link = $links->Next ) {
+         <li>
+ %       if ( $link->BaseObj->Name eq 'Dashboard' ) {
++%           my $privacy = $dashboard->_build_privacy( $link->BaseObj->ObjectType, $link->BaseObj->ObjectId );
++%           if ( $dashboard->CurrentUserCanSee($privacy) ) {
+           <a href="<% $link->BaseURI->Resolver->HREF %>" target="_blank"><% $link->BaseURI->AsString %></a>
++%           } else {
++          <% loc( 'Dashboard #[_1]', $link->BaseObj->id ) %>
++%           }
+ %       } elsif ( $link->BaseObj->ObjectType eq 'RT::System' ) {
+           <% loc('Global') %>
+ %       } elsif ( $link->BaseObj->ObjectType eq 'RT::User' ) {
diff --git a/rt-CVE-2026-108342.patch b/rt-CVE-2026-108342.patch
new file mode 100644
index 0000000..636c359
--- /dev/null
+++ b/rt-CVE-2026-108342.patch
@@ -0,0 +1,473 @@
+# CVE-2026-108342: Multiple stored and reflected Cross-Site Scripting vulnerabilities from insufficient HTML escaping
+From 655939dd72ae8cecb46c2cd95785f51ff4367ef9 Mon Sep 17 00:00:00 2001
+From: PLD backport <claude.domena at gmail.com>
+Date: Thu, 29 Oct 2026 21:36:55 +0100
+Subject: [PATCH 1/9] Escape URLs placed in href by MakeClicky for HTML content
+
+e4e8f7102a stopped escaping matched URLs when MakeClicky is passed
+HTML, relying on ScrubHTML for safety. Scrubbed HTML is safe as text
+content, but MakeClicky also copies the matched URL into an href
+attribute, where text-safe characters like quotes are not safe.
+
+Decode entities in the HTML case before escaping, so the URL is
+escaped once and the double-escaping that e4e8f7102a fixed doesn't
+return.
+
+(cherry picked from commit 362a0f0864f1d80b4b2ec887c755356d80ccacf2)
+
+CVE: CVE-2026-108342
+
+Backport: Added a make-clicky.t case with a double quote in the URL fragment of HTML content; it broke out of the href attribute before this fix.
+
+----
+Expect & escaped as & in HTML MakeClicky URLs
+
+MakeClicky will escape URLs in HTML content with EscapeHTML, as it
+does for text content, and EscapeHTML encodes & as &.
+
+(cherry picked from commit 9a3b462975fbe88300f2a78497a90e7985b9457b)
+
+diff --git a/share/html/Elements/MakeClicky b/share/html/Elements/MakeClicky
+index eba3dd93b..61cf11b5c 100644
+--- a/share/html/Elements/MakeClicky
++++ b/share/html/Elements/MakeClicky
+@@ -47,6 +47,7 @@
+ %# END BPS TAGGED BLOCK }}}
+ <%ONCE>
+ use Regexp::Common qw(URI);
++use HTML::Entities ();
+ 
+ my $escaper = sub {
+     my $content = shift;
+@@ -63,7 +64,8 @@ my %actions = (
+         my %args = @_;
+         my $post = "";
+         $post = ")" if $args{value} !~ /\(/ and $args{value} =~ s/\)$//;
+-        $args{value} = $escaper->($args{value}) unless $args{html};
++        $args{value} = HTML::Entities::decode_entities($args{value}) if $args{html};
++        $args{value} = $escaper->($args{value});
+         my $result = qq{[<a target="_blank" href="$args{value}">}. loc('Open URL') .qq{</a>]};
+         return $args{value} . qq{ <span class="clickylink">$result</span>$post};
+     },
+@@ -71,7 +73,8 @@ my %actions = (
+         my %args = @_;
+         my $post = "";
+         $post = ")" if $args{value} !~ /\(/ and $args{value} =~ s/\)$//;
+-        $args{value} = $escaper->($args{value}) unless $args{html};
++        $args{value} = HTML::Entities::decode_entities($args{value}) if $args{html};
++        $args{value} = $escaper->($args{value});
+         my $result = qq{<a target="_blank" href="$args{value}">$args{value}</a>};
+         return qq{<span class="clickylink">$result</span>$post};
+     },
+
+From 99c4c2b19ca226efed0e44d474327042215be406 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Thu, 20 Aug 2026 09:09:51 -0400
+Subject: [PATCH 2/9] Escape DefaultLabel in the owner and SLA select dropdowns
+
+The |n was added in e3f2d7df42 to avoid double escaping values.
+c3ef8c709c then refactored callers using RT::User->Format,
+which returns plain text. That commit dropped the |n from several
+other locations, but missed this one. SelectSLA later copied the
+line in 821d3edbd6.
+
+(cherry picked from commit fcec2c4bbce836524c156d68437d250f4acf3f71)
+
+CVE: CVE-2026-108342
+
+Backport: Added t/security/owner-label-xss.t: an owner RealName with markup was emitted unescaped on Ticket/Update.html before this fix.
+
+diff --git a/share/html/Elements/SelectOwnerDropdown b/share/html/Elements/SelectOwnerDropdown
+index e2000055d..dbbb0643d 100644
+--- a/share/html/Elements/SelectOwnerDropdown
++++ b/share/html/Elements/SelectOwnerDropdown
+@@ -47,7 +47,7 @@
+ %# END BPS TAGGED BLOCK }}}
+ <select name="<%$Name%>" id="<%$Name%>">
+ %if ($DefaultValue) {
+-<option value=""<% !$Default ? qq[ selected="selected"] : '' |n %>><%$DefaultLabel |n%></option>
++<option value=""<% !$Default ? qq[ selected="selected"] : '' |n %>><% $DefaultLabel %></option>
+ %}
+ %foreach my $UserRef ( @formatednames)  {
+ %my $User = $UserRef->[0];
+diff --git a/share/html/Elements/SelectSLA b/share/html/Elements/SelectSLA
+index 8335f262d..5a4f22c2f 100644
+--- a/share/html/Elements/SelectSLA
++++ b/share/html/Elements/SelectSLA
+@@ -47,7 +47,7 @@
+ %# END BPS TAGGED BLOCK }}}
+ <select name="<%$Name%>" id="<%$Name%>">
+ % if ($DefaultValue) {
+-<option value=""<% !$Default ? qq[ selected="selected"] : '' |n %>><%$DefaultLabel |n%></option>
++<option value=""<% !$Default ? qq[ selected="selected"] : '' |n %>><% $DefaultLabel %></option>
+ % }
+ % for my $sla ( sort keys %{RT->Config->Get('ServiceAgreements')->{'Levels'}} )  {
+ <option <% $sla eq ($Default//'') ? qq[ selected="selected"] : '' |n %> value="<% $sla %>" ><% $sla %></option>
+
+From 044c0f2705aa4a1491007619ffc0d26a08282ff8 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Tue, 18 Aug 2026 17:19:39 -0400
+Subject: [PATCH 3/9] Escape labels and options in query builder condition rows
+
+(cherry picked from commit 52b93d9978615b8c25ed658a551c44ae53f6da5f)
+
+CVE: CVE-2026-108342
+
+Backport: 4.4 ConditionRow has no select Id/class handling and no RecursiveSub; the escaping of plain boxes, select name/id and option values/labels is applied to the 4.4 structure.
+
+diff --git a/share/html/Search/Elements/ConditionRow b/share/html/Search/Elements/ConditionRow
+index 9a2a690e5..1169028d0 100644
+--- a/share/html/Search/Elements/ConditionRow
++++ b/share/html/Search/Elements/ConditionRow
+@@ -56,10 +56,12 @@ return unless $Condition && $Condition->{'Name'};
+ $m->callback( Condition => \$Condition );
+ return unless $Condition;
+ 
++my $escape = sub { return $m->interp->apply_escapes( defined $_[0] ? $_[0] : '', 'h' ) };
++
+ my $handle_block;
+ $handle_block = sub {
+     my $box = shift;
+-    return $box unless ref $box;
++    return $escape->($box) unless ref $box;
+ 
+     my $name = shift;
+     if ( UNIVERSAL::isa($box, 'ARRAY') ) {
+@@ -82,11 +84,13 @@ $handle_block = sub {
+     }
+     if ( $box->{'Type'} eq 'select' ) {
+         my $res = '';
+-        $res .= qq{<select id="$name" name="$name">};
++        my $select_name = $escape->($name);
++        $res .= qq{<select id="$select_name" name="$select_name">};
+         my @options = @{ $box->{'Options'} };
+         while( my $k = shift @options ) {
+             my $v = shift @options;
+-            $res .= qq{<option value="$k">$v</option>};
++            my ( $value, $label ) = ( $escape->($k), $escape->($v) );
++            $res .= qq{<option value="$value">$label</option>};
+         }
+         $res .= qq{</select>};
+         return $res;
+
+From 2efebe292746f8419d48883b0debb4923588a12c Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Tue, 18 Aug 2026 17:19:39 -0400
+Subject: [PATCH 4/9] Use RT's JSON helper for the autocomplete value source
+
+JSON::to_json does not escape forward slashes, RT's own helper does.
+(cherry picked from commit 41ca82ee561e36fb50b84f4c47ba0cf9a0ec73cc)
+
+CVE: CVE-2026-108342
+
+diff --git a/share/html/Elements/SelectCustomFieldValue b/share/html/Elements/SelectCustomFieldValue
+index 003cb83be..13d0b04a6 100644
+--- a/share/html/Elements/SelectCustomFieldValue
++++ b/share/html/Elements/SelectCustomFieldValue
+@@ -69,7 +69,7 @@
+ %       label => $value->Description ? $value->Name . ' (' . $value->Description . ')' : $value->Name,
+ %   };
+ % }
+-jQuery('#'+'CF-' + <% $CustomField->id %>).autocomplete({ source: <% JSON::to_json(\@options) |n %> });
++jQuery('#'+'CF-' + <% $CustomField->id %>).autocomplete({ source: <% JSON(\@options) |n %> });
+ </script>
+ % } else {
+ <input name="<%$Name%>" size="20" value="<% $Default %>" type="text" />
+
+From 1157f22b91caef195fc11b91841c3c995c56090d Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Tue, 18 Aug 2026 17:19:39 -0400
+Subject: [PATCH 5/9] Escape topic names in the article topic chooser
+
+(cherry picked from commit 4ad63a941004d8149d466ce06711ea236268aa13)
+
+CVE: CVE-2026-108342
+
+Backport: 4.4 renders the topic chooser in a table layout; the same escaping is applied to its option line. Added t/security/untrusted-labels-xss.t covering this commit and the two before it: a custom field name, an Autocomplete value containing </script> and a topic name were all emitted raw before.
+
+diff --git a/share/html/Articles/Elements/BeforeMessageBox b/share/html/Articles/Elements/BeforeMessageBox
+index 5bd0ba875..130839c47 100644
+--- a/share/html/Articles/Elements/BeforeMessageBox
++++ b/share/html/Articles/Elements/BeforeMessageBox
+@@ -100,8 +100,7 @@
+ <select name="<% $name_prefix %>Articles-Include-Topic" onchange="this.form.submit()">
+ <option value="" selected>-</option>
+ % for ( @$topics ) { 
+-<option value="<% $_->{id} %>"><%' ' x $_->{depth} . ($_->{name}|| loc('(no name)')) |n%>
+-</option>
++<option value="<% $_->{id} %>"><% ' ' x $_->{depth} |n %><% $_->{name} || loc('(no name)') %></option>
+ % }
+ </select>
+ </td>
+
+From dda0819c8e2da30981eaca39d0922c3462f13da5 Mon Sep 17 00:00:00 2001
+From: PLD backport <claude.domena at gmail.com>
+Date: Thu, 29 Oct 2026 21:42:02 +0100
+Subject: [PATCH 6/9] Canonicalize stored content types before serving them
+
+Canonicalizing the content type eliminates issues caused by formatting
+inconsistencies that could disrupt the behavior of options including
+$AlwaysDownloadAttachments and $TrustHTMLAttachments.
+
+By falling back to "text/plain", this commit also avoids rendering invalid
+content type.
+
+(cherry picked from commit 90e5a416a88251cdbdcc5ccdeafb5df79fd49389)
+
+----
+Keep an unset custom field value content type as NULL
+
+Canonicalizing turned undef into '', which rt-fulltext-indexer skips, so
+short custom field values were no longer indexed.
+
+(cherry picked from commit 1de3247499616b2373e5cd64c851d2f34ce714d4)
+
+CVE: CVE-2026-108342
+
+Backport: The REST2 resource and the 5.0 CVE-2022-25802 test are not in 4.4 (REST2 is the separate RT::Extension::REST2); the svg/pdf Content-Disposition condition in Download/CustomFieldValue/dhandler belongs to the 5.0.10 xss branch and is not added here. Includes follow-up 1de324749. Added t/security/content-type-canonical.t: an attachment and a binary custom field value stored as " text/html " were served as text/html despite TrustHTMLAttachments=0 before this fix.
+
+diff --git a/lib/RT/ObjectCustomFieldValue.pm b/lib/RT/ObjectCustomFieldValue.pm
+index 305d2799f..30bc6660c 100644
+--- a/lib/RT/ObjectCustomFieldValue.pm
++++ b/lib/RT/ObjectCustomFieldValue.pm
+@@ -54,6 +54,7 @@ use warnings;
+ use base 'RT::Record';
+ 
+ use RT::Interface::Web;
++use RT::Util 'CanonicalizeContentType';
+ use Regexp::Common qw(RE_net_IPv4);
+ use Regexp::IPv6 qw($IPv6_re);
+ use Regexp::Common::net::CIDR;
+@@ -83,6 +84,8 @@ sub Create {
+         @_,
+     );
+ 
++    $args{'ContentType'} = CanonicalizeContentType( $args{'ContentType'} ) if defined $args{'ContentType'};
++
+     my $cf = RT::CustomField->new( $self->CurrentUser );
+     $cf->Load( $args{CustomField} );
+ 
+diff --git a/lib/RT/Util.pm b/lib/RT/Util.pm
+index b019cedb2..574dcd6a4 100644
+--- a/lib/RT/Util.pm
++++ b/lib/RT/Util.pm
+@@ -52,9 +52,10 @@ use warnings;
+ 
+ 
+ use base 'Exporter';
+-our @EXPORT = qw/safe_run_child mime_recommended_filename EntityLooksLikeEmailMessage EmailContentTypes/;
++our @EXPORT = qw/safe_run_child mime_recommended_filename EntityLooksLikeEmailMessage EmailContentTypes CanonicalizeContentType/;
+ 
+ use Encode qw/encode/;
++use HTTP::Headers::Util qw/split_header_words join_header_words/;
+ 
+ sub safe_run_child (&) {
+     my $our_pid = $$;
+@@ -135,6 +136,42 @@ sub mime_recommended_filename {
+     return;
+ }
+ 
++=head2 CanonicalizeContentType( TYPE )
++
++Parses TYPE and returns it re-serialized in a form with a single possible
++interpretation, so that matching it against known content types gives the
++same answer as parsing the C<Content-Type> header built from it.
++
++Returns the empty string unless TYPE holds exactly one content type of the
++form C<type/subtype>, followed by parameters that all have a value as
++RFC 2045 section 5.1 requires. Callers are expected to fall back to a type
++of their own choosing on an empty return.
++
++=cut
++
++sub CanonicalizeContentType {
++    my $type = shift;
++    return '' unless defined $type;
++
++    $type =~ s/[^\x20-\x7e]+//g;
++
++    my @words = split_header_words($type);
++    return '' unless @words == 1;
++
++    my $word = $words[0];
++
++    # restricted-name from RFC 6838 section 4.2
++    return '' unless $word->[0] =~ m{^[a-z0-9][a-z0-9!\#\$&^_.+-]*/[a-z0-9][a-z0-9!\#\$&^_.+-]*$};
++
++    # [ type/subtype, undef, name, value, ... ], so parameters start at 2.
++    # RFC 2045 section 5.1 requires a value: reject "text/plain; charset".
++    for ( my $i = 2; $i < @$word; $i += 2 ) {
++        return '' unless defined $word->[ $i + 1 ];
++    }
++
++    return join_header_words(@words);
++}
++
+ sub assert_bytes {
+     my $string = shift;
+     return unless utf8::is_utf8($string);
+diff --git a/share/html/Download/CustomFieldValue/dhandler b/share/html/Download/CustomFieldValue/dhandler
+index 8a4583a3f..4e299d3aa 100644
+--- a/share/html/Download/CustomFieldValue/dhandler
++++ b/share/html/Download/CustomFieldValue/dhandler
+@@ -46,6 +46,8 @@
+ %#
+ %# END BPS TAGGED BLOCK }}}
+ <%perl>
++use RT::Util 'CanonicalizeContentType';
++
+ my $id;
+ my $arg = $m->dhandler_arg;                # get rest of path
+ if ($arg =~ /^(\d+)\//) {
+@@ -63,8 +65,8 @@ unless ($OCFV->id) {
+ 
+ Abort( loc('Permission Denied'), Code => HTTP::Status::HTTP_FORBIDDEN ) unless $OCFV->CurrentUserCanSee;
+ 
+-my $content_type = $OCFV->ContentType || 'text/plain; charset=utf-8';
+-    
++my $content_type = CanonicalizeContentType( $OCFV->ContentType ) || 'text/plain; charset=utf-8';
++
+ if (RT->Config->Get('AlwaysDownloadAttachments') || $content_type =~ m{^(image/svg\+xml|application/pdf)}i) {
+     $r->headers_out->{'Content-Disposition'} = "attachment";
+ }
+diff --git a/share/html/Ticket/Attachment/dhandler b/share/html/Ticket/Attachment/dhandler
+index ef86b1e74..26262b671 100644
+--- a/share/html/Ticket/Attachment/dhandler
++++ b/share/html/Ticket/Attachment/dhandler
+@@ -46,6 +46,8 @@
+ %#
+ %# END BPS TAGGED BLOCK }}}
+ <%perl>
++use RT::Util 'CanonicalizeContentType';
++
+ my ( $ticket, $trans, $attach, $filename );
+ my $arg = $m->dhandler_arg;    # get rest of path
+ if ( $arg =~ m{^(\d+)/(\d+)} ) {
+@@ -66,7 +68,7 @@ unless ( $AttachmentObj->TransactionId() == $trans ) {
+ }
+ 
+ my $content = $AttachmentObj->OriginalContent;
+-my $content_type = $AttachmentObj->ContentType || 'text/plain';
++my $content_type = CanonicalizeContentType( $AttachmentObj->ContentType ) || 'text/plain';
+ 
+ my $attachment_regex = qr{^(image/svg\+xml|application/pdf)}i;
+ if ( RT->Config->Get('AlwaysDownloadAttachments') || ($content_type =~ $attachment_regex) ) {
+
+From 0c4724bbc1e8411732c95a8c949b3157e9b694b7 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Tue, 18 Aug 2026 06:54:07 -0400
+Subject: [PATCH 7/9] Scrub wikitext custom field content after formatting, not
+ before
+
+Scrubbing the source text left Text::WikiFormat free to build markup the
+scrubber never saw, such as a javascript: link or an anchor with an
+event handler attribute. Scrub its output instead, which is what
+actually reaches the browser.
+
+(cherry picked from commit 2b054e1aae899def2a4fad23ec5a39a398839d80)
+
+CVE: CVE-2026-108342
+
+Backport: 4.4 ScrubHTML has no Permissive mode, so the output is scrubbed with the default rules. Added t/security/wikitext-cf-xss.t: "[javascript:alert(1)|click me]" became a javascript: link before this fix.
+
+diff --git a/share/html/Elements/ShowCustomFieldWikitext b/share/html/Elements/ShowCustomFieldWikitext
+index 39ae96fb6..f6ac719e0 100644
+--- a/share/html/Elements/ShowCustomFieldWikitext
++++ b/share/html/Elements/ShowCustomFieldWikitext
+@@ -48,7 +48,6 @@
+ <%$wiki_content|n%>
+ <%init>
+ my $content = $Object->LargeContent || $Object->Content;
+-$content = $m->comp('/Elements/ScrubHTML', Content => $content);
+ my $base = $Object->Object->WikiBase;
+ my %wiki_args = (
+     extended => 1,
+@@ -60,6 +59,7 @@ $m->callback( CallbackName => 'WikiFormatArgs', ARGSRef => \%ARGS, WikiArgsRef =
+ 
+ use Text::WikiFormat;
+ my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { %wiki_args } );
++$wiki_content = $m->comp('/Elements/ScrubHTML', Content => $wiki_content);
+ </%init>
+ <%ARGS>
+ $Object
+
+From a54b0111c785a5bb003a11de03904680b9e7e5b1 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Thu, 20 Aug 2026 10:16:57 -0400
+Subject: [PATCH 8/9] Escape ALIGN values in search result Format
+
+(cherry picked from commit 7487fb90d2a4dab78b6c16dcf82b59237c98e05f)
+
+CVE: CVE-2026-108342
+
+diff --git a/share/html/Elements/CollectionAsTable/Header b/share/html/Elements/CollectionAsTable/Header
+index 309288ae1..8ff6d8084 100644
+--- a/share/html/Elements/CollectionAsTable/Header
++++ b/share/html/Elements/CollectionAsTable/Header
+@@ -104,7 +104,7 @@ foreach my $col ( @Format ) {
+         );
+         ProcessColumnMapValue( $tmp_columnmap, Arguments => [ $attr ] );
+     };
+-    $m->out(qq{ style="text-align: $align"}) if $align;
++    $m->out( ' style="text-align: ' . $m->interp->apply_escapes( $align => 'h' ) . '"' ) if $align;
+     $m->out('>');
+ 
+     my $loc_title;
+
+From a9ff3838c84317aef96791da463d226787e19812 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Thu, 20 Aug 2026 11:11:40 -0400
+Subject: [PATCH 9/9] Limit graph direction to valid graphviz2 rankdir values
+
+(cherry picked from commit 9c1b31b5b7791b51e3d02b8b8100c5ba3d2a36cc)
+
+CVE: CVE-2026-108342
+
+Backport: Added t/security/graph-direction-align.t (also covers the ALIGN commit before this one): a Direction with an embedded quote reached the dot source as an extra attribute, and an ALIGN value from Format broke out of the style attribute, before these fixes.
+
+diff --git a/lib/RT/Graph/Tickets.pm b/lib/RT/Graph/Tickets.pm
+index 5da2fa501..6cc8cd4c7 100644
+--- a/lib/RT/Graph/Tickets.pm
++++ b/lib/RT/Graph/Tickets.pm
+@@ -77,6 +77,11 @@ our %link_style = (
+     RefersTo  => { style => 'dotted' },
+ );
+ 
++# The values dot accepts for the rankdir graph attribute. GraphViz2 quotes
++# attribute values but does not escape quotes embedded in them, so anything
++# reaching rankdir has to be constrained to this set rather than escaped.
++our %RANKDIR_VALUES = map { $_ => 1 } qw(TB LR BT RL);
++
+ # We don't use qw() because perl complains about "possible attempt to put comments in qw() list"
+ our @fill_colors = split ' ',<<EOT;
+     #0000FF #8A2BE2 #A52A2A #DEB887 #5F9EA0 #7FFF00 #D2691E #FF7F50
+@@ -312,11 +317,15 @@ sub TicketLinks {
+     $args{ShowLinks}   = [ grep { $valid_links{$_} } @{$args{ShowLinks}} ];
+     $args{LeadingLink} = 'Members' unless $valid_links{ $args{LeadingLink} };
+ 
++    # Validate the graph direction. Normalized here so the recursive calls
++    # and AddTicket below all see the checked value.
++    $args{Direction} = 'TB' unless defined $args{Direction} && $RANKDIR_VALUES{ $args{Direction} };
++
+     unless ( $args{'Graph'} ) {
+         $args{'Graph'} = GraphViz2->new(
+             name    => 'ticket_links_'. $args{'Ticket'}->id,
+             bgcolor => "transparent",
+-            graph => { rankdir => ($args{'Direction'} || "TB") },
++            graph => { rankdir => $args{'Direction'} },
+             node => { shape => 'box', style => 'filled,rounded', fillcolor => 'white' },
+             global => {directed => 1},
+         );
+diff --git a/share/html/Ticket/Graphs/index.html b/share/html/Ticket/Graphs/index.html
+index 529a2723f..949644947 100644
+--- a/share/html/Ticket/Graphs/index.html
++++ b/share/html/Ticket/Graphs/index.html
+@@ -98,6 +98,8 @@ push @results, $m->comp( '/Search/Elements/EditSearches:Init',
+     SearchFields => \@save_arguments,
+ );
+ 
++$ARGS{'Direction'} = 'TB'
++    unless defined $ARGS{'Direction'} && $RT::Graph::Tickets::RANKDIR_VALUES{ $ARGS{'Direction'} };
+ $ARGS{'LeadingLink'} ||= 'Members';
+ if ( $ARGS{'ShowLinks'} && !ref $ARGS{'ShowLinks'} ) {
+     $ARGS{'ShowLinks'} = [$ARGS{'ShowLinks'}];
diff --git a/rt-CVE-2026-108343.patch b/rt-CVE-2026-108343.patch
new file mode 100644
index 0000000..5fb6e9f
--- /dev/null
+++ b/rt-CVE-2026-108343.patch
@@ -0,0 +1,143 @@
+# CVE-2026-108343: Stored Cross-Site Scripting via custom field link URLs
+From 9b5bebd11cff96b12597ad6ea37752b393101050 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Tue, 18 Aug 2026 02:26:49 -0400
+Subject: [PATCH 1/2] Check custom field URLs for dangerous schemes after
+ expanding placeholders
+
+Placeholders could conceal dangerous schemes, so it's safer to check them
+later.
+
+(cherry picked from commit 0ae7b9ba6597db9debd8962ac38c7bdd4b68fec4)
+
+CVE: CVE-2026-108343
+
+diff --git a/lib/RT/ObjectCustomFieldValue.pm b/lib/RT/ObjectCustomFieldValue.pm
+index 30bc6660c..870b6ba65 100644
+--- a/lib/RT/ObjectCustomFieldValue.pm
++++ b/lib/RT/ObjectCustomFieldValue.pm
+@@ -370,18 +370,10 @@ sub _FillInTemplateURL {
+     return undef unless defined $url && length $url;
+ 
+     # special case, whole value should be an URL
+-    if ( $url =~ /^__CustomField__/ ) {
++    my $value_is_url = $url =~ /^__CustomField__/ ? 1 : 0;
++    if ( $value_is_url ) {
+         my $value = $self->Content;
+         $value //= '';
+-        # protect from potentially malicious URLs
+-        if ( $value =~ /^\s*(?:javascript|data):/i ) {
+-            my $object = $self->Object;
+-            $RT::Logger->error(
+-                "Potentially dangerous URL type in custom field '". $self->CustomFieldObj->Name ."'"
+-                ." on ". ref($object) ." #". $object->id
+-            );
+-            return undef;
+-        }
+         $url =~ s/^__CustomField__/$value/;
+     }
+ 
+@@ -395,9 +387,37 @@ sub _FillInTemplateURL {
+         }gxe;
+     }
+ 
++    # protect from potentially malicious URLs
++    if ( $value_is_url && $self->_IsDangerousURL($url) ) {
++        my $object = $self->Object;
++        $RT::Logger->error(
++            "Potentially dangerous URL type in custom field '". $self->CustomFieldObj->Name ."'"
++            ." on ". ref($object) ." #". $object->id
++        );
++        return undef;
++    }
++
+     return $url;
+ } }
+ 
++=head2 _IsDangerousURL URL
++
++Returns true if the given URL uses a scheme that browsers can execute as
++code. Characters that browsers ignore when they parse the scheme are removed
++before the check.
++
++=cut
++
++sub _IsDangerousURL {
++    my $self = shift;
++    my $url  = shift;
++
++    $url =~ s/[\x09\x0a\x0d]//g;
++    $url =~ s/^[\x00-\x20]+//;
++
++    return $url =~ /^(?:javascript|data):/i ? 1 : 0;
++}
++
+ 
+ =head2 ValueLinkURL
+ 
+
+From 0632584450e7f0c452f5fc37e2c16bf9113601c1 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Tue, 18 Aug 2026 02:26:49 -0400
+Subject: [PATCH 2/2] Skip the "See also" block when the custom field URL is
+ rejected
+
+IncludeContentForValue returns undef then, which rendered an empty link and
+logged uninitialized value warnings.
+
+(cherry picked from commit ff0f0fcfc51a1cbdd6d50a46b3746260d9057c64)
+
+CVE: CVE-2026-108343
+
+Backport: Added t/security/cf-url-scheme-bypass.t: a LinkValueTo value of "java<TAB>script:" passed the old check and was rendered as a link.
+
+diff --git a/share/html/Elements/ShowCustomFields b/share/html/Elements/ShowCustomFields
+index ef30726f5..f39c7530a 100644
+--- a/share/html/Elements/ShowCustomFields
++++ b/share/html/Elements/ShowCustomFields
+@@ -130,15 +130,16 @@ my $print_value = sub {
+ 
+     # This section automatically populates a div with the "IncludeContentForValue" for this custom
+     # field if it's been defined
+-    if ( $cf->IncludeContentForValue ) {
++    my $include = $value->IncludeContentForValue;
++    if ( defined $include && length $include ) {
+        my $vid = $value->id;
+        $m->out(   '<div class="object_cf_value_include" id="object_cf_value_'. $vid .'">' );
+        $m->out( loc("See also:") );
+-       $m->out(   '<a href="'. $m->interp->apply_escapes($value->IncludeContentForValue, 'h') .'">' );
+-       $m->out( $m->interp->apply_escapes($value->IncludeContentForValue, 'h') );
++       $m->out(   '<a href="'. $m->interp->apply_escapes($include, 'h') .'">' );
++       $m->out( $m->interp->apply_escapes($include, 'h') );
+        $m->out(   qq{</a></div>\n} );
+        $m->out(   qq{<script><!--\njQuery('#object_cf_value_$vid').load(} );
+-       $m->out(   $m->interp->apply_escapes($value->IncludeContentForValue, 'j') );
++       $m->out(   $m->interp->apply_escapes($include, 'j') );
+        $m->out(   qq{);\n--></script>\n} );
+     }
+ };
+diff --git a/share/html/m/ticket/show b/share/html/m/ticket/show
+index 0f2013d84..6355980ef 100644
+--- a/share/html/m/ticket/show
++++ b/share/html/m/ticket/show
+@@ -188,15 +188,16 @@ my $print_value = sub {
+ 
+     # This section automatically populates a div with the "IncludeContentForValue" for this custom
+     # field if it's been defined
+-    if ( $cf->IncludeContentForValue ) {
++    my $include = $value->IncludeContentForValue;
++    if ( defined $include && length $include ) {
+        my $vid = $value->id;
+        $m->out(   '<div class="object_cf_value_include" id="object_cf_value_'. $vid .'">' );
+        $m->print( loc("See also:") );
+-       $m->out(   '<a href="'. $m->interp->apply_escapes($value->IncludeContentForValue, 'h') .'">' );
+-       $m->out( $m->interp->apply_escapes($value->IncludeContentForValue, 'h') );
++       $m->out(   '<a href="'. $m->interp->apply_escapes($include, 'h') .'">' );
++       $m->out( $m->interp->apply_escapes($include, 'h') );
+        $m->out(   qq{</a></div>\n} );
+        $m->out(   qq{<script><!--\njQuery('#object_cf_value_$vid').load(} );
+-       $m->out(   $m->interp->apply_escapes($value->IncludeContentForValue, 'j') );
++       $m->out(   $m->interp->apply_escapes($include, 'j') );
+        $m->out(   qq{);\n--></script>\n} );
+     }
+ };
diff --git a/rt-CVE-2026-108344.patch b/rt-CVE-2026-108344.patch
new file mode 100644
index 0000000..4646f3d
--- /dev/null
+++ b/rt-CVE-2026-108344.patch
@@ -0,0 +1,116 @@
+# CVE-2026-108344: Login CSRF resulting in session fixation on the password login form
+From ee3b07829eafb963f1f8f18b346ba832668cdd42 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Thu, 20 Aug 2026 16:51:42 -0400
+Subject: [PATCH] Strictly gate login with RestrictLoginReferrer enabled
+
+As noted in the documentation, this option is intended to force
+all logins to go through the RT login page. Enforce this
+explicitly rather than relying only on CSRF blocks.
+
+Also perform checks before authentication for all auth
+entry points.
+
+Backport: RT 4.4 has no MFA, so the DoAuth check goes right after the
+logged-in shortcut; the RT_Config.pm.in note is placed at the 4.4 location
+of $RestrictLoginReferrer.
+
+CVE: CVE-2026-108344
+
+(cherry picked from commit d54ff77225e484e9ea8b8e58f53f5c957e5a902b)
+
+diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
+index 506b2542b..7ce2c75ca 100644
+--- a/etc/RT_Config.pm.in
++++ b/etc/RT_Config.pm.in
+@@ -2582,6 +2582,8 @@ it to 1 forces all logins to come from the login box, so the
+ user is aware that they are being logged in.  The default is off, for
+ backwards compatability.
+ 
++Requires C<$RestrictReferrer> to also be enabled for full coverage.
++
+ =cut
+ 
+ Set($RestrictLoginReferrer, 0);
+diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
+index 279567924..22f96e254 100644
+--- a/lib/RT/Interface/Web.pm
++++ b/lib/RT/Interface/Web.pm
+@@ -831,6 +831,16 @@ sub AttemptPasswordAuthentication {
+     my $ARGS = shift;
+     return unless defined $ARGS->{user} && defined $ARGS->{pass};
+ 
++    # Check RestrictLoginReferrer before authentication happens, so that a
++    # login which is not allowed never creates a session. /Elements/DoAuth
++    # does the same for the passwords external auth validates itself.
++
++    if ( RT->Config->Get('RestrictLoginReferrer') and not IsLoginPageReferer() ) {
++        RT->Logger->error( "REJECTED LOGIN for @{[$ARGS->{user}]} from @{[RequestENV('REMOTE_ADDR')]}: "
++                . "not from RT's login page (Referrer: @{[RequestENV('HTTP_REFERER') || 'none']})" );
++        return (0, HTML::Mason::Commands::loc("Use RT's login page to log in"));
++    }
++
+     my $user_obj = RT::CurrentUser->new();
+     $user_obj->Load( $ARGS->{user} );
+ 
+@@ -1564,6 +1574,45 @@ sub IsRefererCSRFWhitelisted {
+     return (0,$referer,$configs);
+ }
+ 
++=head3 IsLoginPageReferer
++
++Returns true if the current request came from RT's login page.
++
++A request qualifies if it supplies a Referrer header, and that Referrer is one of
++the URLs where RT serves the login form, which is the login page itself, or the index
++page, which renders the form inline for a logged-out user.
++
++REST endpoints are exempt. Their clients are not browsers and send no
++Referrer, and with C<$RestrictReferrer> enabled L</IsPossibleCSRF> confines a
++session created by a REST request to REST endpoints, so such a session cannot
++be used to browse RT.
++
++=cut
++
++sub IsLoginPageReferer {
++    return 1 if $HTML::Mason::Commands::r->path_info =~ m{^/+REST/\d+\.\d+(/|$)};
++
++    my $referer = RequestENV('HTTP_REFERER') or return 0;
++    my $uri     = URI->new($referer);
++
++    # A Referrer with no host and port is never a page RT served.
++    # @ReferrerWhitelist can accept one anyway: android-app://com.slack/
++    # matches on authority, and its path of / would read as the index page.
++    return 0 unless $uri->can('host_port');
++
++    # The login form is served by RT itself, so the Referrer has to be a host
++    # RT answers to.
++    my ($host_ok) = IsRefererCSRFWhitelisted($referer);
++    return 0 unless $host_ok;
++
++    my $path    = $uri->path // '';
++    my $webpath = RT->Config->Get('WebPath') || '';
++    return 0 unless $path =~ s{^\Q$webpath\E}{};
++    $path = '/' unless length $path;
++
++    return $path =~ m{^(?:/(?:index\.html)?|/m/?(?:index\.html)?|/NoAuth/Login\.html)$} ? 1 : 0;
++}
++
+ =head3 _NormalizeHost
+ 
+ Takes a URI and creates a URI object that's been normalized
+diff --git a/share/html/Elements/DoAuth b/share/html/Elements/DoAuth
+index e82f32773..8e2b99dbe 100644
+--- a/share/html/Elements/DoAuth
++++ b/share/html/Elements/DoAuth
+@@ -49,6 +49,10 @@
+ # return as quickly as possible if the user is logged in
+ return if $session{CurrentUser} && $session{'CurrentUser'}->id;
+ 
++return if defined $user and defined $pass
++    and RT->Config->Get('RestrictLoginReferrer')
++    and not RT::Interface::Web::IsLoginPageReferer();
++
+ # It's important to nab the next page from the session before we
+ # potentially blow the session away below.
+ my $next = $session{'NextPage'}->{ $ARGS{'next'} || "" };
diff --git a/rt-CVE-2026-108346.patch b/rt-CVE-2026-108346.patch
new file mode 100644
index 0000000..27ca267
--- /dev/null
+++ b/rt-CVE-2026-108346.patch
@@ -0,0 +1,211 @@
+# CVE-2026-108346: Disclosure of hidden ticket time fields via Self Service export, REST 2.0 API, and search
+From 128723227494669a4aaee3d6aa82ca4a03fe5d84 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Thu, 20 Aug 2026 04:44:51 -0400
+Subject: [PATCH] Fully respect $HideTimeFieldsFromUnprivilegedUsers config
+
+Previously it only applied to the ticket display page, ticket history and
+RT::Ticket::Serialize. Now it covers all the accessors, including those that
+sort by hidden time fields, in which case the sorting is ignored.
+
+(cherry picked from commit 5eb500cc1035d5675aa6814ee1bd68f2b09e9b9d)
+CVE: CVE-2026-108346
+
+Backport: REST2 hunk dropped (REST2 is the separate RT::Extension::REST2 in
+4.4). RT::Transactions hunks dropped: 4.4 has no transaction search
+(_IntLimit, _TicketLimit, OrderByCols) and its AddRecord already
+filters through Transaction::CurrentUserCanSee, which now hides
+transactions that only change a hidden time field.
+
+diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
+index 1f8ba6b6a..b5e9684a7 100644
+--- a/lib/RT/Ticket.pm
++++ b/lib/RT/Ticket.pm
+@@ -1457,6 +1457,9 @@ Returns the amount of time worked on this ticket and all child tickets
+ sub TotalTimeWorked {
+     my $self = shift;
+     my $seen = shift || {};
++
++    return 0 unless $self->CurrentUserCanSeeTime;
++
+     my $time = $self->TimeWorked;
+     my $links = $self->Members;
+     LINK: while (my $link = $links->Next) {
+@@ -1492,6 +1495,8 @@ sub TimeWorkedPerUser {
+     my $self = shift;
+     my %time_worked;
+ 
++    return \%time_worked unless $self->CurrentUserCanSeeTime;
++
+     my $transactions = $self->Transactions;
+     $transactions->Limit(
+         FIELD           => 'TimeTaken',
+@@ -2873,6 +2878,9 @@ sub _Value {
+     unless ( $self->CurrentUserHasRight('ShowTicket') ) {
+         return (undef);
+     }
++
++    return undef if $self->IsTimeField($field) && !$self->CurrentUserCanSeeTime;
++
+     return ( $self->SUPER::_Value($field) );
+ 
+ }
+@@ -3251,8 +3259,24 @@ Returns true if the current user can see time worked, estimated, left
+ sub CurrentUserCanSeeTime {
+     my $self = shift;
+ 
+-    return $self->CurrentUser->Privileged ||
+-           !RT->Config->Get('HideTimeFieldsFromUnprivilegedUsers');
++    return 1 unless RT->Config->Get('HideTimeFieldsFromUnprivilegedUsers');
++    return 1 if $self->CurrentUser->Id == RT->SystemUser->Id;
++    return $self->CurrentUser->Privileged ? 1 : 0;
++}
++
++=head2 IsTimeField FIELD
++
++Returns true if FIELD is one of the ticket time columns governed by
++C<$HideTimeFieldsFromUnprivilegedUsers>. Callable as a class method.
++
++=cut
++
++sub IsTimeField {
++    my $self  = shift;
++    my $field = shift;
++
++    return 0 unless defined $field;
++    return $field =~ /^Time(?:Worked|Estimated|Left)$/i ? 1 : 0;
+ }
+ 
+ sub Table {'Tickets'}
+diff --git a/lib/RT/Tickets.pm b/lib/RT/Tickets.pm
+index a7a89cccc..0ccdfc2b1 100644
+--- a/lib/RT/Tickets.pm
++++ b/lib/RT/Tickets.pm
+@@ -414,6 +414,24 @@ sub _EnumLimit {
+     );
+ }
+ 
++=head2 IsHiddenTimeField FIELD
++
++Returns true if FIELD is one of the time columns and the current user may not
++see it, per L<RT::Ticket/CurrentUserCanSeeTime>.
++
++=cut
++
++sub IsHiddenTimeField {
++    my $self  = shift;
++    my $field = shift;
++
++    return 0 unless defined $field;
++    return 0 unless RT::Ticket->IsTimeField($field);
++
++    my $ticket = RT::Ticket->new( $self->CurrentUser );
++    return $ticket->CurrentUserCanSeeTime ? 0 : 1;
++}
++
+ =head2 _IntLimit
+ 
+ Handle fields where the values are limited to integers.  (For example,
+@@ -427,6 +445,8 @@ Meta Data:
+ sub _IntLimit {
+     my ( $sb, $field, $op, $value, @rest ) = @_;
+ 
++    return if $sb->IsHiddenTimeField($field);
++
+     my $is_a_like = $op =~ /MATCHES|ENDSWITH|STARTSWITH|LIKE/i;
+ 
+     # We want to support <id LIKE '1%'> for ticket autocomplete,
+@@ -1618,6 +1638,7 @@ sub OrderByCols {
+             push @res, $row;
+             next;
+         }
++        next if $self->IsHiddenTimeField( $row->{FIELD} );
+         if ( $row->{FIELD} !~ /\./ ) {
+             my $meta = $FIELD_METADATA{ $row->{FIELD} };
+             unless ( $meta ) {
+diff --git a/lib/RT/Transaction.pm b/lib/RT/Transaction.pm
+index 7486f2add..13b42f669 100644
+--- a/lib/RT/Transaction.pm
++++ b/lib/RT/Transaction.pm
+@@ -1448,6 +1448,8 @@ sub _Value {
+         return undef;
+     }
+ 
++    return undef if $self->IsTimeField($field) && !$self->CurrentUserCanSeeTime;
++
+     return $self->SUPER::_Value( $field );
+ }
+ 
+@@ -1478,6 +1480,9 @@ sub CurrentUserCanSee {
+         return 0 unless $cf->CurrentUserCanSee;
+     }
+ 
++    # A transaction that only records a change to a hidden time field has nothing else to show
++    return 0 if $self->IsHiddenTimeFieldChange;
++
+     # Transactions that might have changed the ->Object's visibility to
+     # the current user are marked readable
+     return 1 if $self->{ _object_is_readable };
+@@ -1486,6 +1491,53 @@ sub CurrentUserCanSee {
+     return $self->Object->CurrentUserCanSee("Transaction", $self);
+ }
+ 
++=head2 CurrentUserCanSeeTime
++
++Returns true if the current user can see the time values recorded on this
++transaction, deferring to L<RT::Ticket/CurrentUserCanSeeTime> for ticket
++transactions.
++
++=cut
++
++sub CurrentUserCanSeeTime {
++    my $self = shift;
++
++    return 1 unless RT->Config->Get('HideTimeFieldsFromUnprivilegedUsers');
++
++    my $object = $self->Object;
++    return 1 unless $object && $object->can('CurrentUserCanSeeTime');
++    return $object->CurrentUserCanSeeTime;
++}
++
++=head2 IsTimeField FIELD
++
++Returns true if FIELD is one of the transaction time columns governed by
++C<$HideTimeFieldsFromUnprivilegedUsers>. Callable as a class method.
++
++=cut
++
++sub IsTimeField {
++    my $self  = shift;
++    my $field = shift;
++
++    return 0 unless defined $field;
++    return $field eq 'TimeTaken' ? 1 : 0;
++}
++
++=head2 IsHiddenTimeFieldChange
++
++Returns true if this transaction records a change to one of the time fields
++the current user is not allowed to see.
++
++=cut
++
++sub IsHiddenTimeFieldChange {
++    my $self = shift;
++
++    return 0 unless RT::Ticket->IsTimeField( $self->__Value('Field') );
++    return $self->CurrentUserCanSeeTime ? 0 : 1;
++}
++
+ 
+ sub Ticket {
+     my $self = shift;
+@@ -2178,6 +2230,8 @@ sub Serialize {
+         $store{NewValue} = \($ticket->UID);
+     }
+ 
++    delete $store{TimeTaken} unless $self->CurrentUserCanSeeTime;
++
+     return %store;
+ }
+ 
diff --git a/rt-CVE-2026-108347.patch b/rt-CVE-2026-108347.patch
new file mode 100644
index 0000000..a5c0454
--- /dev/null
+++ b/rt-CVE-2026-108347.patch
@@ -0,0 +1,52 @@
+# CVE-2026-108347: Information disclosure via missing visibility checks in ticket relationship graphs
+From aeee6f31cb69bd798839efac4431ce3038835321 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Tue, 18 Aug 2026 11:13:04 -0400
+Subject: [PATCH] Check ShowTicket before rendering the properties of a graph
+ node
+
+The graph draws a node for a linked ticket the viewer cannot see, as
+Elements/ShowLink does, but it also rendered the properties asked for into
+that node. Most property callbacks read through _Value and came back
+empty, but OwnerObj reads Owner with __Value to avoid recursion, and
+custom field values are gated on SeeCustomField alone, so both rendered.
+FillUsing runs the same callbacks and prints the value in the legend.
+
+(cherry picked from commit 5943576c7749d091d833025c0768c909c990b779)
+CVE: CVE-2026-108347
+
+Backport: RT::Ticket::CurrentUserCanSee now tolerates being called without
+arguments, as it does upstream since 753a8de24 (5.0); 4.4 warned on
+such calls, which this and the following backports introduce.
+
+diff --git a/lib/RT/Graph/Tickets.pm b/lib/RT/Graph/Tickets.pm
+index 6cc8cd4c7..496d80fd4 100644
+--- a/lib/RT/Graph/Tickets.pm
++++ b/lib/RT/Graph/Tickets.pm
+@@ -250,6 +250,13 @@ sub AddTicket {
+         @_
+     );
+ 
++    unless ( $args{'Ticket'}->CurrentUserCanSee ) {
++        return $args{'Graph'}->add_node(
++            name  => $args{'Ticket'}->id,
++            style => 'filled,rounded',
++        );
++    }
++
+     my %node_style = (
+         style => 'filled,rounded',
+         %{ $ticket_status_style{ $args{'Ticket'}->Status } || {} },
+diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
+index b5e9684a7..8871997e2 100644
+--- a/lib/RT/Ticket.pm
++++ b/lib/RT/Ticket.pm
+@@ -3000,7 +3000,7 @@ sub CurrentUserCanSee {
+     my ($what, $txn) = @_;
+     return 0 unless $self->CurrentUserHasRight('ShowTicket');
+ 
+-    return 1 if $what ne "Transaction";
++    return 1 if ( $what // '' ) ne "Transaction";
+ 
+     # If it's a comment, we need to be extra special careful
+     my $type = $txn->__Value('Type');
diff --git a/rt-CVE-2026-108348.patch b/rt-CVE-2026-108348.patch
new file mode 100644
index 0000000..2f340a6
--- /dev/null
+++ b/rt-CVE-2026-108348.patch
@@ -0,0 +1,367 @@
+# CVE-2026-108348: Security tokens and password salts generated with a non-cryptographic PRNG
+From 4eed0f15e6779eae8689e950ac307abe2af9adf8 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Fri, 21 Aug 2026 16:16:23 -0400
+Subject: [PATCH] Generate security tokens and password salts from the system
+ CSPRNG
+
+Migrate token generation from core Perl rand calls to use random values
+supplied by Crypt::URandom for improved entropy.
+
+New helper functions return undef on error. Call sites are updated to
+stop the operation that required the random value, like generating a
+token, but to otherwise try to degrade gracefully and report the error.
+
+All outputs keep their existing length and character set, so nothing
+stored or in a URL changes shape.
+
+Backport: lib/RT/AuthToken.pm (REST 2 tokens) and etc/cpanfile do not exist
+in RT 4.4; the RSS/iCal link handling from RT::Interface::Web::MenuBuilder
+is applied to share/html/Elements/Tabs, and the Crypt::URandom requirement
+is added to sbin/rt-test-dependencies.in.
+
+CVE: CVE-2026-108348
+
+(cherry picked from commit 16a999472b3d470cc9831c5e92df608876c790d1)
+
+diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
+index 22f96e254..d079e808a 100644
+--- a/lib/RT/Interface/Web.pm
++++ b/lib/RT/Interface/Web.pm
+@@ -1714,10 +1714,21 @@ sub ExpandCSRFToken {
+ sub StoreRequestToken {
+     my $ARGS = shift;
+ 
+-    my $token = Digest::MD5::md5_hex(time . {} . $$ . rand(1024));
++    my $token = RT::Util::random_hex(32);
++    unless ( defined $token ) {
++        RT->Logger->error("Couldn't generate a request token");
++        return;
++    }
++
+     my $user = $HTML::Mason::Commands::session{'CurrentUser'}->UserObj;
++    my $auth = $user->GenerateAuthString( $token );
++    unless ( defined $auth ) {
++        RT->Logger->error("Couldn't sign a request token for user " . $user->id);
++        return;
++    }
++
+     my $data = {
+-        auth => $user->GenerateAuthString( $token ),
++        auth => $auth,
+         path => $HTML::Mason::Commands::r->path_info,
+         args => $ARGS,
+     };
+@@ -1755,6 +1766,16 @@ sub MaybeShowInterstitialCSRFPage {
+     $RT::Logger->notice("Possible CSRF: ".RT::CurrentUser->new->loc($msg, @loc));
+ 
+     my $token = StoreRequestToken($ARGS);
++    unless ( defined $token ) {
++        # The interstitial is what lets the user confirm this request, and it
++        # needs a token. Without one, refuse rather than wave the request
++        # through the check the interstitial exists to perform.
++        HTML::Mason::Commands::Abort(
++            HTML::Mason::Commands::loc("Your request could not be verified. Please try again, and contact your administrator if the problem persists."),
++            Code => HTTP::Status::HTTP_INTERNAL_SERVER_ERROR,
++        );
++    }
++
+     $HTML::Mason::Commands::m->comp(
+         '/Elements/CSRF',
+         OriginalURL => RT->Config->Get('WebBaseURL') . RT->Config->Get('WebPath') . $HTML::Mason::Commands::r->path_info,
+diff --git a/lib/RT/User.pm b/lib/RT/User.pm
+index e58fc7aba..c80b04878 100644
+--- a/lib/RT/User.pm
++++ b/lib/RT/User.pm
+@@ -176,6 +176,10 @@ sub Create {
+         return ($ok, $msg) if !$ok;
+ 
+         $args{'Password'} = $self->_GeneratePassword($args{'Password'});
++        unless ( defined $args{'Password'} ) {
++            RT->Logger->error("Couldn't hash a password for new user $args{'Name'}");
++            return ( 0, $self->loc("Could not set password") );
++        }
+     }
+ 
+     #TODO Specify some sensible defaults.
+@@ -1142,6 +1146,10 @@ sub SetPassword {
+ 
+         my $new = !$self->HasPassword;
+         $password = $self->_GeneratePassword($password);
++        unless ( defined $password ) {
++            RT->Logger->error("Couldn't hash a password for user " . $self->id);
++            return ( 0, $self->loc("Could not set password") );
++        }
+ 
+         ( $val, $msg ) = $self->_Set(Field => 'Password', Value => $password);
+         if ($val) {
+@@ -1170,9 +1178,12 @@ sub _GeneratePassword_bcrypt {
+     } else {
+         $rounds = RT->Config->Get('BcryptCost');
+ 
+-        # Generate a random 16-octet base64 salt
+-        $salt = "";
+-        $salt .= pack("C", int rand(256)) for 1..16;
++        # Generate a random 16-octet salt
++        $salt = RT::Util::random_bytes(16);
++        unless ( defined $salt ) {
++            RT->Logger->error("Couldn't generate a bcrypt salt");
++            return;
++        }
+     }
+ 
+     my $hash = Crypt::Eksblowfish::Bcrypt::bcrypt_hash({
+@@ -1191,11 +1202,18 @@ sub _GeneratePassword_sha512 {
+     my $self = shift;
+     my ($password, $salt) = @_;
+ 
+-    # Generate a 16-character base64 salt
++    # Generate a 16-character base64 salt. The alphabet is 64 characters, a
++    # power of two, so masking each random octet down to six bits picks from
++    # it without bias.
+     unless ($salt) {
+-        $salt = "";
+-        $salt .= ("a".."z", "A".."Z","0".."9", "+", "/")[rand 64]
+-            for 1..16;
++        my $bytes = RT::Util::random_bytes(16);
++        unless ( defined $bytes ) {
++            RT->Logger->error("Couldn't generate a sha512 salt");
++            return;
++        }
++
++        my @alphabet = ("a".."z", "A".."Z", "0".."9", "+", "/");
++        $salt = join '', map { $alphabet[ $_ & 0x3f ] } unpack( 'C*', $bytes );
+     }
+ 
+     my $sha = Digest::SHA->new(512);
+@@ -1214,6 +1232,8 @@ By default, the method is currently C<bcrypt>.
+ 
+ =cut
+ 
++# Returns undef if the salt cannot be generated. Callers storing the result
++# MUST check it: an undef here means no password.
+ sub _GeneratePassword {
+     my $self = shift;
+     return $self->_GeneratePassword_bcrypt(@_);
+@@ -1254,7 +1274,9 @@ sub IsPassword {
+ 
+    if ( $self->PrincipalObj->Disabled ) {
+         # Run the bcrypt generator to avoid timing side-channel attacks
+-        RT::Util::constant_time_eq($self->_GeneratePassword_bcrypt($value), '0' x 64);
++        if ( defined( my $hash = $self->_GeneratePassword_bcrypt($value) ) ) {
++            RT::Util::constant_time_eq( $hash, '0' x 64 );
++        }
+         $RT::Logger->info(
+             "Disabled user " . $self->Name . " tried to log in" );
+         return (undef);
+@@ -1262,7 +1284,9 @@ sub IsPassword {
+ 
+     unless ($self->HasPassword) {
+         # Run the bcrypt generator to avoid timing side-channel attacks
+-        RT::Util::constant_time_eq($self->_GeneratePassword_bcrypt($value), '0' x 64);
++        if ( defined( my $hash = $self->_GeneratePassword_bcrypt($value) ) ) {
++            RT::Util::constant_time_eq( $hash, '0' x 64 );
++        }
+         return undef;
+     }
+     my $stored = $self->__Value('Password');
+@@ -1319,8 +1343,12 @@ sub IsPassword {
+ 
+     # We got here by validating successfully, but with a legacy
+     # password form.  Update to the most recent form.
++    # The password was valid; if it cannot be rehashed right now, leave it in
++    # its old form rather than failing a login that should have succeeded.
+     my $obj = $self->isa("RT::CurrentUser") ? $self->UserObj : $self;
+-    $obj->_Set(Field => 'Password', Value =>  $self->_GeneratePassword($value) );
++    if ( defined( my $rehashed = $self->_GeneratePassword($value) ) ) {
++        $obj->_Set(Field => 'Password', Value => $rehashed );
++    }
+     return 1;
+ }
+ 
+@@ -1359,7 +1387,11 @@ Generate a random authentication string for the user.
+ 
+ sub GenerateAuthToken {
+     my $self = shift;
+-    my $token = substr(Digest::MD5::md5_hex(time . {} . rand()),0,16);
++    my $token = RT::Util::random_hex(16);
++    unless ( defined $token ) {
++        RT->Logger->error("Couldn't generate an auth token for user " . $self->id);
++        return ( 0, $self->loc("Could not generate a secure token") );
++    }
+     return $self->SetAuthToken( $token );
+ }
+ 
+@@ -1379,7 +1411,11 @@ sub GenerateAuthString {
+         # Mint on demand via SystemUser: signing RSS/iCal/CSRF URLs is a
+         # system action, but ModifySelf isn't granted to Privileged users
+         # by default, so SetAuthToken under the current user would fail.
+-        $token = substr(Digest::MD5::md5_hex(time . {} . rand()), 0, 16);
++        $token = RT::Util::random_hex(16);
++        unless ( defined $token ) {
++            RT->Logger->error("Couldn't generate an auth token for user " . $self->id);
++            return;
++        }
+         my $writer = RT::User->new( RT->SystemUser );
+         $writer->Load( $self->id );
+         my ($ok, $msg) = $writer->SetAuthToken($token);
+diff --git a/lib/RT/Util.pm b/lib/RT/Util.pm
+index 574dcd6a4..5f083a6cf 100644
+--- a/lib/RT/Util.pm
++++ b/lib/RT/Util.pm
+@@ -56,6 +56,7 @@ our @EXPORT = qw/safe_run_child mime_recommended_filename EntityLooksLikeEmailMe
+ 
+ use Encode qw/encode/;
+ use HTTP::Headers::Util qw/split_header_words join_header_words/;
++use Crypt::URandom ();
+ 
+ sub safe_run_child (&) {
+     my $our_pid = $$;
+@@ -252,6 +253,66 @@ sub constant_time_eq {
+     return 0 + not $result;
+ }
+ 
++=head2 C<random_bytes($count)>
++
++Returns C<$count> random octets.
++
++Returns undef, having logged the reason, if the platform cannot supply
++random data or supplies less than was asked for.
++
++=cut
++
++sub random_bytes {
++    my $count = shift;
++
++    # Count must be a positive integer.
++    unless ( defined $count && $count =~ /\A[0-9]+\z/ && $count > 0 ) {
++        RT->Logger->error('random_bytes requires a positive integer count');
++        return;
++    }
++
++    # Crypt::URandom reports failure by croaking; convert that to RT's
++    # convention here so callers only ever have to check for undef.
++    my $bytes = eval { Crypt::URandom::urandom($count) };
++    unless ( defined $bytes ) {
++        RT->Logger->error("Could not read $count octets from the system CSPRNG: $@");
++        return;
++    }
++
++    unless ( length($bytes) == $count ) {
++        RT->Logger->error(
++            "Asked the system CSPRNG for $count octets and got " . length($bytes) );
++        return;
++    }
++
++    return $bytes;
++}
++
++=head2 C<random_hex($count)>
++
++Returns a string of C<$count> lowercase hexadecimal digits drawn from
++L</random_bytes>, so C<$count> characters carry C<$count * 4> bits of
++entropy. Convenient where a random value has to survive as text, in a
++URL or an ascii database column.
++
++Returns undef under the same conditions as L</random_bytes>.
++
++=cut
++
++sub random_hex {
++    my $count = shift;
++
++    unless ( defined $count && $count =~ /\A[0-9]+\z/ && $count > 0 ) {
++        RT->Logger->error('random_hex requires a positive integer count');
++        return;
++    }
++
++    my $bytes = random_bytes( int( ( $count + 1 ) / 2 ) );
++    return unless defined $bytes;
++
++    return substr( unpack( 'H*', $bytes ), 0, $count );
++}
++
+ =head2 EntityLooksLikeEmailMessage( MIME::Entity )
+ 
+ Check MIME type headers for entities that look like email.
+diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
+index 102d55852..3426f6e83 100644
+--- a/sbin/rt-test-dependencies.in
++++ b/sbin/rt-test-dependencies.in
+@@ -120,6 +120,7 @@ Class::Accessor::Fast
+ Clone
+ Convert::Color
+ Crypt::Eksblowfish
++Crypt::URandom 0.55
+ CSS::Minifier::XS
+ CSS::Squish 0.06
+ Data::GUID
+diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
+index 6da33d78e..5fa3d060d 100644
+--- a/share/html/Elements/Tabs
++++ b/share/html/Elements/Tabs
+@@ -1013,22 +1013,36 @@ my $build_main_nav = sub {
+                                        Order   => $rss_data{Order},
+                                        OrderBy => $rss_data{OrderBy}
+                                      );
+-                my $RSSPath = join '/', map $m->interp->apply_escapes( $_, 'u' ),
+-                    $session{'CurrentUser'}->UserObj->Name,
+-                    $session{'CurrentUser'}
++                # The feed URL carries its own signature, so with no auth
++                # string there is no link to offer. Leave the item out
++                # rather than produce one that cannot authenticate.
++                my $rss_auth = $session{'CurrentUser'}
+                     ->UserObj->GenerateAuthString(   $rss_data{Query}
+                                                    . $rss_data{Order}
+                                                    . $rss_data{OrderBy} );
++                if ( defined $rss_auth ) {
++                    my $RSSPath = join '/', map $m->interp->apply_escapes( $_, 'u' ),
++                        $session{'CurrentUser'}->UserObj->Name, $rss_auth;
+ 
+-                $more->child( rss => title => loc('RSS'), path => "/NoAuth/rss/$RSSPath/$RSSQueryString");
++                    $more->child( rss => title => loc('RSS'), path => "/NoAuth/rss/$RSSPath/$RSSQueryString");
++                }
++                else {
++                    RT->Logger->error("Couldn't sign an RSS feed URL; omitting the RSS link");
++                }
+             }
+ 
+             if ( RT->Config->Get('EnableICal') ) {
+-                my $ical_path = join '/', map $m->interp->apply_escapes($_, 'u'),
+-                    $session{'CurrentUser'}->UserObj->Name,
+-                    $session{'CurrentUser'}->UserObj->GenerateAuthString( $rss_data{Query} ),
+-                    $rss_data{Query};
+-                $more->child( ical => title => loc('iCal'), path => '/NoAuth/iCal/'.$ical_path);
++                my $ical_auth = $session{'CurrentUser'}->UserObj->GenerateAuthString( $rss_data{Query} );
++                if ( defined $ical_auth ) {
++                    my $ical_path = join '/', map $m->interp->apply_escapes($_, 'u'),
++                        $session{'CurrentUser'}->UserObj->Name,
++                        $ical_auth,
++                        $rss_data{Query};
++                    $more->child( ical => title => loc('iCal'), path => '/NoAuth/iCal/'.$ical_path);
++                }
++                else {
++                    RT->Logger->error("Couldn't sign an iCal feed URL; omitting the iCal link");
++                }
+             }
+ 
+             if ($request_path =~ m{^/Search/Results.html}
+diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
+index faf280f9e..b06b37664 100644
+--- a/share/html/Search/Results.html
++++ b/share/html/Search/Results.html
+@@ -175,10 +175,13 @@ my $refresh = $session{'tickets_refresh_interval'}
+ 
+ # Check $m->request_args, not $DECODED_ARGS, to avoid creating a new CSRF token on each refresh
+ if (RT->Config->Get('RestrictReferrer') and $refresh and not $m->request_args->{CSRF_Token}) {
++    # Auto-refresh needs a token to get back past the referrer check. If one
++    # cannot be minted the results still render; only the refresh is dropped.
+     my $token = RT::Interface::Web::StoreRequestToken( $session{'CurrentSearchHash'} );
+     $m->notes->{RefreshURL} = RT->Config->Get('WebURL')
+         . "Search/Results.html?CSRF_Token="
+-            . $token;
++            . $token
++        if defined $token;
+ }
+ 
+ my %link_rel;
diff --git a/rt-CVE-2026-108349.patch b/rt-CVE-2026-108349.patch
new file mode 100644
index 0000000..e60289a
--- /dev/null
+++ b/rt-CVE-2026-108349.patch
@@ -0,0 +1,152 @@
+# CVE-2026-108349: Unauthenticated denial of service via unbounded CSS cache growth
+From 563abef4ae36cbf74aaaca2e8f19f36a670bbf14 Mon Sep 17 00:00:00 2001
+From: sunnavy <sunnavy at bestpractical.com>
+Date: Fri, 21 Aug 2026 13:07:52 -0400
+Subject: [PATCH] Validate theme name before squishing CSS
+
+The theme in /NoAuth/css/<theme>/squished-<key>.css comes straight from the
+URL and was handed to SquishedCSS unchecked. It's safer and more efficient
+to validate the passed in <theme> in advance.
+
+With the abstraction of RT::Interface::Web::Themes, we now have a central,
+reusable method for all theme-name validation.
+
+Backport: RT 4.4 keeps base/ (shared styles with a main.css) next to the
+themes and left it out of the theme list, so Themes() skips it too;
+RT::Interface::Web does not enable the state feature in 4.4, so the
+list is cached in a file-scoped variable. RT::User::Stylesheet keeps
+the 4.4 Config->Get(..., $self->CurrentUser) call.
+
+CVE: CVE-2026-108349
+
+(cherry picked from commit 545260afad5bd0e7c9f1137044feaf9bff47adf1)
+
+diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
+index 73e3dabc2..437bf47f8 100644
+--- a/lib/RT/Config.pm
++++ b/lib/RT/Config.pm
+@@ -54,7 +54,6 @@ use warnings;
+ use 5.010;
+ use File::Spec ();
+ use Symbol::Global::Name;
+-use List::MoreUtils 'uniq';
+ 
+ # Store log messages generated before RT::Logger is available
+ our @PreInitLoggerMessages;
+@@ -230,34 +229,14 @@ our %META;
+         WidgetArguments => {
+             Description => 'Theme',                  #loc
+             Callback    => sub {
+-                state @stylesheets;
+-                unless (@stylesheets) {
+-                    for my $static_path ( RT::Interface::Web->StaticRoots ) {
+-                        my $css_path =
+-                          File::Spec->catdir( $static_path, 'css' );
+-                        next unless -d $css_path;
+-                        if ( opendir my $dh, $css_path ) {
+-                            push @stylesheets, grep {
+-                                $_ ne 'base' && -e File::Spec->catfile( $css_path, $_, 'main.css' )
+-                            } readdir $dh;
+-                        }
+-                        else {
+-                            RT->Logger->error("Can't read $css_path: $!");
+-                        }
+-                    }
+-                    @stylesheets = sort { lc $a cmp lc $b } uniq @stylesheets;
+-                }
+-                return { Values => \@stylesheets };
++                return { Values => [ RT::Interface::Web->Themes ] };
+             },
+         },
+         PostLoadCheck => sub {
+             my $self = shift;
+             my $value = $self->Get('WebDefaultStylesheet');
+ 
+-            my @roots = RT::Interface::Web->StaticRoots;
+-            for my $root (@roots) {
+-                return if -d "$root/css/$value";
+-            }
++            return if grep { $_ eq $value } RT::Interface::Web->Themes;
+ 
+             $RT::Logger->warning(
+                 "The default stylesheet ($value) does not exist in this instance of RT. "
+diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
+index d079e808a..b2f9635b4 100644
+--- a/lib/RT/Interface/Web.pm
++++ b/lib/RT/Interface/Web.pm
+@@ -1426,6 +1426,42 @@ sub StaticRoots {
+     return grep { $_ and -d $_ } @static;
+ }
+ 
++=head2 Themes
++
++Returns the names of the themes this instance of RT provides, i.e. the
++directories with a F<main.css> under F<css> in any of the L</StaticRoots>.
++C<$WebDefaultStylesheet> and the per-user theme preference name one of these.
++
++The list is cached for the life of the process, so a theme added on disk is
++not offered until RT is restarted.
++
++=cut
++
++my @THEMES;
++sub Themes {
++    my $self = shift;
++
++    my @themes = @THEMES;
++    return @themes if @themes;
++
++    my %seen;
++    for my $root ( $self->StaticRoots ) {
++        my $path = "$root/css";
++        next unless -d $path;
++
++        if ( opendir my $dh, $path ) {
++            # base holds the styles every theme builds on, it is not a theme
++            push @themes, grep { !/^\./ && $_ ne 'base' && -e "$path/$_/main.css" && !$seen{$_}++ } readdir $dh;
++            closedir $dh;
++        }
++        else {
++            RT->Logger->error("Can't read $path: $!");
++        }
++    }
++    @THEMES = @themes = sort { lc $a cmp lc $b } @themes;
++    return @themes;
++}
++
+ our %IS_WHITELISTED_COMPONENT = (
+     # The RSS feed embeds an auth token in the path, but query
+     # information for the search.  Because it's a straight-up read, in
+diff --git a/lib/RT/User.pm b/lib/RT/User.pm
+index c80b04878..db0a7648b 100644
+--- a/lib/RT/User.pm
++++ b/lib/RT/User.pm
+@@ -1806,14 +1806,7 @@ sub Stylesheet {
+     my $self = shift;
+ 
+     my $style = RT->Config->Get('WebDefaultStylesheet', $self->CurrentUser);
+-
+-    if (RT::Interface::Web->ComponentPathIsSafe($style)) {
+-        for my $root (RT::Interface::Web->StaticRoots) {
+-            if (-d "$root/css/$style") {
+-                return $style
+-            }
+-        }
+-    }
++    return $style if grep { $_ eq $style } RT::Interface::Web->Themes;
+ 
+     # Fall back to the system stylesheet.
+     return RT->Config->Get('WebDefaultStylesheet');
+diff --git a/share/html/NoAuth/css/dhandler b/share/html/NoAuth/css/dhandler
+index 0377cd574..6d0242e10 100644
+--- a/share/html/NoAuth/css/dhandler
++++ b/share/html/NoAuth/css/dhandler
+@@ -52,6 +52,8 @@ my $squisher;
+ my $arg = $m->dhandler_arg;
+ if ( $arg =~ m{(.*)/squished-[0-9a-f]{32}\.css$} ) {
+     my $style = $1;
++    $m->abort(404) unless grep { $_ eq $style } RT::Interface::Web->Themes;
++
+     my $squished = RT::Interface::Web::SquishedCSS( $style );
+     # Don't send Last-Modified since we don't handle If-Modified-Since
+     #$r->header_out( 'Last-Modified'  => $squished->ModifiedTimeString );
diff --git a/rt-CVE-2026-108350.patch b/rt-CVE-2026-108350.patch
new file mode 100644
index 0000000..fe796e3
--- /dev/null
+++ b/rt-CVE-2026-108350.patch
@@ -0,0 +1,122 @@
+# CVE-2026-108350: Cryptographic signature trust check bypass in incoming S/MIME mail
+From 41dd5fa973ee74579d2797b03c0e879bc83cd825 Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Fri, 14 Aug 2026 15:56:20 -0400
+Subject: [PATCH] Run SMIME certificate checks before optional loop exits
+
+Previously, early loop exits to skip recording a certificate
+would also skip some certificate checking steps. Update to
+run all necessary certificate checks first, then evaluate
+optional steps.
+
+Also return a failure status when no signer certificate is found,
+rather than dying later, and supply fallbacks for certificate fields
+that may be absent when building status messages.
+
+(cherry picked from commit 557872bd0a3f6eec68d6a23100407c9dd1dce79c)
+CVE: CVE-2026-108350
+
+diff --git a/lib/RT/Crypt/SMIME.pm b/lib/RT/Crypt/SMIME.pm
+index 128f79731..7cb7538c8 100644
+--- a/lib/RT/Crypt/SMIME.pm
++++ b/lib/RT/Crypt/SMIME.pm
+@@ -531,28 +531,45 @@ sub Verify {
+         return %res;
+     }
+ 
+-    my $signer;
+-    if ( my $key = do { $keyfh->seek(0, 0); local $/; readline $keyfh } ) {{
+-        my %info = $self->GetCertificateInfo( Certificate => $key );
++    my $key = do { $keyfh->seek(0, 0); local $/; readline $keyfh };
++    my %info = $key ? $self->GetCertificateInfo( Certificate => $key ) : ();
++    my $signer = $info{info}[0];
++
++    # openssl was run with -noverify above, so it checked the signature but
++    # not the certificate chain; the trust decision is made here instead.
++    # Every path from here to a success status must pass through it, so keep
++    # it out of the block below, which uses last to skip the optional work of
++    # recording the certificate on a user.
++
++    unless ( $signer ) {
++        $res{exit_code} = 1;
++        $res{'message'} = "Validation failed";
++        $res{'status'} = $self->FormatStatus({
++            Operation => "Verify", Status => "BAD",
++            Message => "No signer certificate was found",
++            Trust => "NONE",
++        });
++        return %res;
++    }
+ 
+-        $signer = $info{info}[0];
+-        last unless $signer and $signer->{User}[0]{String};
++    unless ( $signer->{TrustLevel} > 0 or $opts->{AcceptUntrustedCAs} ) {
++        # We don't trust it, mark validation as failed
++        $res{exit_code} = 1;
++        $res{'message'} = "Validation failed";
++        $res{'status'} = $self->FormatStatus({
++            Operation => "Verify", Status => "BAD",
++            Message => "The signing CA was not trusted",
++            Serial => $signer->{'Serial Number'} || 'unknown',
++            UserString => $signer->{User}[0]{String} || 'unknown',
++            ExpireTimestamp => $signer->{Expire}->Unix(),
++            CreatedTimestamp => $signer->{Created}->Unix(),
++            Trust => "NONE",
++        });
++        return %res;
++    }
+ 
+-        unless ( $info{info}[0]{TrustLevel} > 0 or $opts->{AcceptUntrustedCAs}) {
+-            # We don't trust it; give it the finger
+-            $res{exit_code} = 1;
+-            $res{'message'} = "Validation failed";
+-            $res{'status'} = $self->FormatStatus({
+-                Operation => "Verify", Status => "BAD",
+-                Message => "The signing CA was not trusted",
+-                Serial => $signer->{'Serial Number'} || 'unknown',
+-                UserString => $signer->{User}[0]{String},
+-                ExpireTimestamp => $signer->{Expire}->Unix(),
+-                CreatedTimestamp => $signer->{Created}->Unix(),
+-                Trust => "NONE",
+-            });
+-            return %res;
+-        }
++    {
++        last unless length( $signer->{User}[0]{String} // '' );
+ 
+         my ($address) = Email::Address->parse($signer->{User}[0]{String});
+         last unless $address;
+@@ -571,7 +588,7 @@ sub Verify {
+         my ($status, $msg) = $user->SetSMIMECertificate( $key );
+         $RT::Logger->error("Couldn't set SMIME certificate for user #". $user->id .": $msg")
+             unless $status;
+-    }}
++    }
+ 
+     my $res_entity = _extract_msg_from_buf( \$buf );
+     unless ( $res_entity ) {
+@@ -596,11 +613,11 @@ sub Verify {
+ 
+     $res{'status'} = $self->FormatStatus({
+         Operation => "Verify", Status => "DONE",
+-        Message => "The signature is good, signed by ".$signer->{User}[0]{String}.", assured by " . $signer->{Issuer}[0]{String} . ", trust is ".$signer->{TrustTerse},
++        Message => "The signature is good, signed by ". ( $signer->{User}[0]{String} || 'unknown' ) .", assured by " . ( $signer->{Issuer}[0]{String} || 'unknown' ) . ", trust is ".$signer->{TrustTerse},
+         Serial => $signer->{'Serial Number'} || 'unknown',
+-        UserString => $signer->{User}[0]{String},
++        UserString => $signer->{User}[0]{String} // '',
+         Trust => uc($signer->{TrustTerse}),
+-        Issuer => $signer->{Issuer}[0]{String},
++        Issuer => $signer->{Issuer}[0]{String} || 'unknown',
+         ExpireTimestamp => $signer->{Expire}->Unix(),
+         CreatedTimestamp => $signer->{Created}->Unix(),
+     });
+@@ -1149,7 +1166,8 @@ sub RunOpenSSLVerify
+         $res->{info}[0]{TrustTerse} = "unknown";
+         $res->{info}[0]{TrustLevel} = 0;
+     }
+-    $res->{info}[0]{Formatted} = $res->{info}[0]{User}[0]{String} . " (issued by $res->{info}[0]{Issuer}[0]{String})";
++    $res->{info}[0]{Formatted} = ( $res->{info}[0]{User}[0]{String} || 'unknown' )
++        . " (issued by " . ( $res->{info}[0]{Issuer}[0]{String} || 'unknown' ) . ")";
+ }
+ 
+ # Extract the subject email address from an S/MIME certificate.
diff --git a/rt-CVE-2026-108351.patch b/rt-CVE-2026-108351.patch
new file mode 100644
index 0000000..a627245
--- /dev/null
+++ b/rt-CVE-2026-108351.patch
@@ -0,0 +1,97 @@
+# CVE-2026-108351: Remote code execution via ExecuteCode right bypass in template administration
+From 596473b7711a683ea9a4b191e0aec2a7bf8dcd5a Mon Sep 17 00:00:00 2001
+From: Jim Brandt <jbrandt at bestpractical.com>
+Date: Fri, 14 Aug 2026 14:31:02 -0400
+Subject: [PATCH] Use rights-free value for internal template Type checks
+
+Template code checks Type to determine Perl or Simple in
+many places. These checks are internal, so they should not
+be filtered through CurrentUsers ability to see the template
+based on ShowTemplate. Convert the Type checks that gate code
+to use a rights-free lookup to always get the correct value from
+the database and not undef.
+
+(cherry picked from commit 05536e766c6308a689e40a5eccd0100a98b76953)
+CVE: CVE-2026-108351
+
+diff --git a/lib/RT/Template.pm b/lib/RT/Template.pm
+index f5b571546..cbddd966a 100644
+--- a/lib/RT/Template.pm
++++ b/lib/RT/Template.pm
+@@ -147,6 +147,26 @@ sub _Value {
+ 
+ }
+ 
++# Takes an optional type, and defaults to this template's stored type. Returns
++# true if content of that type is Perl, which allows code.
++#
++# This wrapper can always access the stored Type value, even if CurrentUser
++# doesn't have ShowTemplate, so it will always see what is in the DB.
++#
++# An undetermined type counts as Perl as has been true historically.
++#
++# The rights checks that gate code use this. _ParseContent dispatches on Type
++# directly, because it has already passed a read check and reads the stored
++# value anyway, and an undetermined type renders there without running code.
++
++sub _TypeIsPerl {
++    my $self = shift;
++    my $type = @_ ? shift : $self->__Value('Type');
++
++    return 1 unless defined $type;
++    return $type eq 'Perl';
++}
++
+ =head2 Load <identifier>
+ 
+ Load a template, either by number or by name.
+@@ -259,7 +279,8 @@ sub Create {
+         @_
+     );
+ 
+-    if ( $args{Type} eq 'Perl' && !$self->CurrentUser->HasRight(Right => 'ExecuteCode', Object => $RT::System) ) {
++    if ( $self->_TypeIsPerl( $args{Type} )
++        && !$self->CurrentUser->HasRight(Right => 'ExecuteCode', Object => $RT::System) ) {
+         return ( undef, $self->loc('Permission Denied') );
+     }
+ 
+@@ -762,7 +783,7 @@ sub SetType {
+     my $self    = shift;
+     my $NewType = shift;
+ 
+-    if ($NewType eq 'Perl' && !$self->CurrentUser->HasRight(Right => 'ExecuteCode', Object => $RT::System)) {
++    if ($self->_TypeIsPerl($NewType) && !$self->CurrentUser->HasRight(Right => 'ExecuteCode', Object => $RT::System)) {
+         return ( undef, $self->loc('Permission Denied') );
+     }
+ 
+@@ -779,7 +800,7 @@ sub SetContent {
+     my $self       = shift;
+     my $NewContent = shift;
+ 
+-    if ($self->Type eq 'Perl' && !$self->CurrentUser->HasRight(Right => 'ExecuteCode', Object => $RT::System)) {
++    if ($self->_TypeIsPerl && !$self->CurrentUser->HasRight(Right => 'ExecuteCode', Object => $RT::System)) {
+         return ( undef, $self->loc('Permission Denied') );
+     }
+ 
+@@ -906,10 +927,10 @@ sub _UpdateAttributes {
+         @_,
+     );
+ 
<Skipped 1020 lines>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rt.git/commitdiff/1f1e4d095adbf4fd66d9e1202cc4ff13757b281b



More information about the pld-cvs-commit mailing list