diff --git a/meta-python/recipes-devtools/python/python3-twisted/CVE-2026-115776_p1.patch b/meta-python/recipes-devtools/python/python3-twisted/CVE-2026-115776_p1.patch
new file mode 100644
index 0000000000..ceb5c3139e
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-twisted/CVE-2026-115776_p1.patch
@@ -0,0 +1,111 @@
+From ac90fb7b0ab73688a581fcd9a7c0577ec8ca3059 Mon Sep 17 00:00:00 2001
+From: arkmarta <arkadiuszmarta@proton.me>
+Date: Wed, 5 Aug 2026 11:14:11 +0200
+Subject: [PATCH] words: bound the IRC server line buffer (Fixes #12770)
+
+CVE: CVE-2026-115776
+Upstream-Status: Backport [https://github.com/twisted/twisted/commit/ac90fb7b0ab73688a581fcd9a7c0577ec8ca3059]
+
+Signed-off-by: Yogita Urade <yurade@cisco.com>
+---
+ src/twisted/words/newsfragments/12770.bugfix |  1 +
+ src/twisted/words/protocols/irc.py           | 21 ++++++++++++++
+ src/twisted/words/test/test_irc.py           | 29 ++++++++++++++++++++
+ 3 files changed, 51 insertions(+)
+ create mode 100644 src/twisted/words/newsfragments/12770.bugfix
+
+diff --git a/src/twisted/words/newsfragments/12770.bugfix b/src/twisted/words/newsfragments/12770.bugfix
+new file mode 100644
+index 000000000..6bf3a63ee
+--- /dev/null
++++ b/src/twisted/words/newsfragments/12770.bugfix
+@@ -0,0 +1 @@
++twisted.words.protocols.irc.IRC now limits the length of a single line, so a peer can no longer exhaust server memory by sending data without a line delimiter.
+diff --git a/src/twisted/words/protocols/irc.py b/src/twisted/words/protocols/irc.py
+index 2906fa562..1123cdc4a 100644
+--- a/src/twisted/words/protocols/irc.py
++++ b/src/twisted/words/protocols/irc.py
+@@ -255,6 +255,9 @@ class IRC(protocol.Protocol):
+     """
+ 
+     buffer = ""
++    # Longest line accepted, matching twisted.protocols.basic.LineReceiver.
++    # An unterminated line would otherwise grow self.buffer without bound.
++    MAX_LENGTH = 16384
+     hostname = None
+ 
+     encoding: Optional[str] = None
+@@ -415,8 +418,15 @@ class IRC(protocol.Protocol):
+         # Put the (possibly empty) element after the last LF back in the
+         # buffer
+         self.buffer = lines.pop()
++        if len(self.buffer) > self.MAX_LENGTH:
++            # An unterminated line too long to be a valid message.
++            line, self.buffer = self.buffer, ""
++            return self.lineLengthExceeded(line)
+ 
+         for line in lines:
++            if len(line) > self.MAX_LENGTH:
++                self.buffer = ""
++                return self.lineLengthExceeded(line)
+             if len(line) <= 2:
+                 # This is a blank line, at best.
+                 continue
+@@ -429,6 +439,17 @@ class IRC(protocol.Protocol):
+ 
+             self.handleCommand(command, prefix, params)
+ 
++    def lineLengthExceeded(self, line):
++        """
++        Called when a line longer than C{MAX_LENGTH} is received. The default
++        behaviour, matching L{twisted.protocols.basic.LineReceiver}, drops the
++        connection.
++
++        @param line: The line which exceeded the length limit.
++        @type line: L{str}
++        """
++        return self.transport.loseConnection()
++
+     def handleCommand(self, command, prefix, params):
+         """
+         Determine the function to call for the given command and call it with
+diff --git a/src/twisted/words/test/test_irc.py b/src/twisted/words/test/test_irc.py
+index c30cfc522..cd400f9ed 100644
+--- a/src/twisted/words/test/test_irc.py
++++ b/src/twisted/words/test/test_irc.py
+@@ -1522,6 +1522,35 @@ class BasicServerFunctionalityTests(IRCTestCase):
+             bufferValue = bufferValue.decode("utf-8")
+         self.assertEqual(bufferValue, s)
+ 
++    def test_dataReceivedBoundsUnterminatedLine(self) -> None:
++        """
++        A line longer than L{irc.IRC.MAX_LENGTH} that arrives without a
++        delimiter is not buffered without bound. The buffer is cleared and the
++        connection is dropped, matching L{twisted.protocols.basic.LineReceiver}.
++        """
++        self.p.dataReceived(b"A" * (self.p.MAX_LENGTH + 1))
++        self.assertEqual(self.p.buffer, "")
++        self.assertTrue(self.t.closed)
++
++    def test_dataReceivedDropsOverlongTerminatedLine(self) -> None:
++        """
++        A delimited line longer than L{irc.IRC.MAX_LENGTH} is dropped rather
++        than dispatched.
++        """
++        self.p.dataReceived(b"A" * (self.p.MAX_LENGTH + 1) + b"\n")
++        self.assertEqual(self.p.buffer, "")
++        self.assertTrue(self.t.closed)
++
++    def test_dataReceivedAcceptsBoundedInput(self) -> None:
++        """
++        Input under the length limit is buffered normally and the connection is
++        left open.
++        """
++        self.p.dataReceived(b"\r\n")
++        self.p.dataReceived(b"AB")
++        self.assertEqual(self.p.buffer, "AB")
++        self.assertFalse(self.t.closed)
++
+     def test_sendMessage(self):
+         """
+         Passing a command and parameters to L{IRC.sendMessage} results in a
diff --git a/meta-python/recipes-devtools/python/python3-twisted/CVE-2026-115776_p2.patch b/meta-python/recipes-devtools/python/python3-twisted/CVE-2026-115776_p2.patch
new file mode 100644
index 0000000000..55ecb71a66
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-twisted/CVE-2026-115776_p2.patch
@@ -0,0 +1,79 @@
+From 01f8cff7753c1edac132380b2ea939fa6bdbab30 Mon Sep 17 00:00:00 2001
+From: arkmarta <arkadiuszmarta@proton.me>
+Date: Sat, 8 Aug 2026 08:25:06 +0200
+Subject: [PATCH] bound the IRC server line length
+
+CVE: CVE-2026-115776
+Upstream-Status: Backport [https://github.com/twisted/twisted/commit/01f8cff7753c1edac132380b2ea939fa6bdbab30]
+
+Signed-off-by: Yogita Urade <yurade@cisco.com>
+---
+ src/twisted/words/newsfragments/12770.bugfix |  2 +-
+ src/twisted/words/protocols/irc.py           | 19 ++++++++++++-------
+ 2 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/src/twisted/words/newsfragments/12770.bugfix b/src/twisted/words/newsfragments/12770.bugfix
+index 6bf3a63ee..2a62e440f 100644
+--- a/src/twisted/words/newsfragments/12770.bugfix
++++ b/src/twisted/words/newsfragments/12770.bugfix
+@@ -1 +1 @@
+-twisted.words.protocols.irc.IRC now limits the length of a single line, so a peer can no longer exhaust server memory by sending data without a line delimiter.
++twisted.words.protocols.irc.IRC.dataReceived now limits the length of a single line, so a peer can no longer exhaust server memory by sending data without a line delimiter.
+diff --git a/src/twisted/words/protocols/irc.py b/src/twisted/words/protocols/irc.py
+index 1123cdc4a..2249edd99 100644
+--- a/src/twisted/words/protocols/irc.py
++++ b/src/twisted/words/protocols/irc.py
+@@ -252,11 +252,14 @@ def parseModes(modes, params, paramModes=("", "")):
+ class IRC(protocol.Protocol):
+     """
+     Internet Relay Chat server protocol.
++
++    @cvar MAX_LENGTH: The maximum length of a line to allow. A received line
++        longer than this drops the connection, matching
++        L{twisted.protocols.basic.LineReceiver}, so an unterminated line cannot
++        grow the buffer without bound. Default is 16384.
+     """
+ 
+     buffer = ""
+-    # Longest line accepted, matching twisted.protocols.basic.LineReceiver.
+-    # An unterminated line would otherwise grow self.buffer without bound.
+     MAX_LENGTH = 16384
+     hostname = None
+ 
+@@ -421,12 +424,14 @@ class IRC(protocol.Protocol):
+         if len(self.buffer) > self.MAX_LENGTH:
+             # An unterminated line too long to be a valid message.
+             line, self.buffer = self.buffer, ""
+-            return self.lineLengthExceeded(line)
++            self.lineLengthExceeded(line)
++            return
+ 
+         for line in lines:
+             if len(line) > self.MAX_LENGTH:
+                 self.buffer = ""
+-                return self.lineLengthExceeded(line)
++                self.lineLengthExceeded(line)
++                return
+             if len(line) <= 2:
+                 # This is a blank line, at best.
+                 continue
+@@ -439,16 +444,16 @@ class IRC(protocol.Protocol):
+ 
+             self.handleCommand(command, prefix, params)
+ 
+-    def lineLengthExceeded(self, line):
++    def lineLengthExceeded(self, line: str) -> None:
+         """
+         Called when a line longer than C{MAX_LENGTH} is received. The default
+         behaviour, matching L{twisted.protocols.basic.LineReceiver}, drops the
+         connection.
+ 
+         @param line: The line which exceeded the length limit.
+-        @type line: L{str}
+         """
+-        return self.transport.loseConnection()
++        assert self.transport is not None
++        self.transport.loseConnection()
+ 
+     def handleCommand(self, command, prefix, params):
+         """
diff --git a/meta-python/recipes-devtools/python/python3-twisted_25.5.0.bb b/meta-python/recipes-devtools/python/python3-twisted_25.5.0.bb
index 7ba179c455..72dc23e3fb 100644
--- a/meta-python/recipes-devtools/python/python3-twisted_25.5.0.bb
+++ b/meta-python/recipes-devtools/python/python3-twisted_25.5.0.bb
@@ -22,6 +22,8 @@ SRC_URI += "file://CVE-2026-42304_p1.patch \
            file://CVE-2026-115877_p3.patch \
            file://CVE-2026-115774_p1.patch \
            file://CVE-2026-115774_p2.patch \
+           file://CVE-2026-115776_p1.patch \
+           file://CVE-2026-115776_p2.patch \
            "
 
 SRC_URI[sha256sum] = "1deb272358cb6be1e3e8fc6f9c8b36f78eb0fa7c2233d2dbe11ec6fee04ea316"
