CVE-2026-87082: CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
Net::IDN::Punycode versions before 2.590 for Perl hang, crash or return a wrong label via unvalidated malformed UTF-8 in encode_punycode. Neither backend checks that its input is well-formed UTF-8, so a string with the UTF-8 flag set over malformed bytes, as the :utf8 PerlIO layer produces from any malformed input, reaches the encoder unchecked. On perl 5.32 and later the XS backend reports a malformed sequence with a length of `(STRLEN)-1`, so the scan steps back one byte instead of forward and never ends. On earlier perls the XS returns a valid label for a different name. The pure-Perl backend runs a regex over the flagged string. Depending on the bytes, it aborts with SIGBUS on perl 5.28 and later, dies with a panic, or returns a wrong label. The documented conversion functions match the label against Unicode properties first and that match dies on such a string, so only a direct call to encode_punycode reaches the defect. The decoder is not affected. A direct caller encoding attacker-supplied bytes hangs, crashes or gets a label for a name the input never held.
AI Analysis
Technical Summary
Net::IDN::Punycode versions prior to 2.590 for Perl do not validate that input to encode_punycode is well-formed UTF-8. Malformed UTF-8 strings with the UTF-8 flag set can cause the XS backend to enter an infinite loop on Perl 5.32 and later due to incorrect handling of malformed sequences. On earlier Perl versions, the XS backend returns incorrect labels. The pure-Perl backend may abort with SIGBUS, panic, or return wrong labels depending on the input bytes. Documented conversion functions avoid this by matching Unicode properties first, which die on malformed strings, so only direct calls to encode_punycode are vulnerable. The decoder is not affected.
Potential Impact
An attacker supplying malformed UTF-8 input directly to encode_punycode can cause the application to hang indefinitely (infinite loop), crash with a SIGBUS, or produce incorrect domain name labels. This can lead to denial of service or incorrect processing of domain names. The vulnerability does not affect documented conversion functions or the decoder.
Mitigation Recommendations
A fix is available in Net::IDN::Punycode version 2.590 and later. Users should upgrade to version 2.590 or above to resolve this issue. Until upgraded, avoid direct calls to encode_punycode with untrusted input. Documented conversion functions are not vulnerable and should be used instead.
CVE-2026-87082: CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
Description
Net::IDN::Punycode versions before 2.590 for Perl hang, crash or return a wrong label via unvalidated malformed UTF-8 in encode_punycode. Neither backend checks that its input is well-formed UTF-8, so a string with the UTF-8 flag set over malformed bytes, as the :utf8 PerlIO layer produces from any malformed input, reaches the encoder unchecked. On perl 5.32 and later the XS backend reports a malformed sequence with a length of `(STRLEN)-1`, so the scan steps back one byte instead of forward and never ends. On earlier perls the XS returns a valid label for a different name. The pure-Perl backend runs a regex over the flagged string. Depending on the bytes, it aborts with SIGBUS on perl 5.28 and later, dies with a panic, or returns a wrong label. The documented conversion functions match the label against Unicode properties first and that match dies on such a string, so only a direct call to encode_punycode reaches the defect. The decoder is not affected. A direct caller encoding attacker-supplied bytes hangs, crashes or gets a label for a name the input never held.
CVSS v3.1
Score 7.5high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Net::IDN::Punycode versions prior to 2.590 for Perl do not validate that input to encode_punycode is well-formed UTF-8. Malformed UTF-8 strings with the UTF-8 flag set can cause the XS backend to enter an infinite loop on Perl 5.32 and later due to incorrect handling of malformed sequences. On earlier Perl versions, the XS backend returns incorrect labels. The pure-Perl backend may abort with SIGBUS, panic, or return wrong labels depending on the input bytes. Documented conversion functions avoid this by matching Unicode properties first, which die on malformed strings, so only direct calls to encode_punycode are vulnerable. The decoder is not affected.
Potential Impact
An attacker supplying malformed UTF-8 input directly to encode_punycode can cause the application to hang indefinitely (infinite loop), crash with a SIGBUS, or produce incorrect domain name labels. This can lead to denial of service or incorrect processing of domain names. The vulnerability does not affect documented conversion functions or the decoder.
Mitigation Recommendations
A fix is available in Net::IDN::Punycode version 2.590 and later. Users should upgrade to version 2.590 or above to resolve this issue. Until upgraded, avoid direct calls to encode_punycode with untrusted input. Documented conversion functions are not vulnerable and should be used instead.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-09-08T19:22:20.005Z
- State
- PUBLISHED
Threat ID: 6ab22f39f7a7c54106d716b0
Added to database: 09/22/2026, 07:33:13 UTC
Last enriched: 09/22/2026, 07:47:39 UTC
Last updated: 09/22/2026, 17:33:22 UTC
Views: 13
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.