CVE-2016-15059: Net::IDN::Punycode versions before 2.301 for Perl allow a heap buffer overflow via unchecked writes past the output buffer in encode_punycode

Published Sep 22, 2026
·
Updated

Net::IDN::Punycode versions before 2.301 for Perl allow a heap buffer overflow via unchecked writes past the output buffer in encodepunycode.

The XS backend builds the encoded label in the string buffer of the scalar it returns, sized from the input length. The loop that emits the digits of each code point checks for room before every write, but the write of the last digit of each round and the write of the terminating NUL do not, so an input whose encoded form fills the buffer writes past its end.

Only the XS backend is affected.

Encoding an attacker-supplied string corrupts the heap.

Affected Software

1 affected component
cpan/Net::IDN::Punycode<2.301

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Net-IDN-Encode to a version that resolves this vulnerability.

    Fixed in 2.301

Event History

Sep 22, 2026
CVE Published
via MITRE·07:18 AM
Data Sourced
via MITRE·07:18 AM
RemedyDescriptionWeakness

Frequently Asked Questions

1

Which deployments are affected?

Only the XS backend is affected. The issue applies to Net::IDN::Punycode versions before 2.301 for Perl when they encode input through encode_punycode.

2

What must an attacker control to trigger the overflow?

An attacker needs to supply a string that is passed to encode_punycode and whose encoded form fills the output buffer. Processing that input can cause heap corruption.

3

How can I determine whether my application is exposed?

Check whether the application uses a Net::IDN::Punycode version earlier than 2.301 and whether it uses the XS backend. Then identify paths where untrusted strings are passed to encode_punycode.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203