CVE-2017-6216
Description
A reflected XSS vulnerability in the novaksolutions/infusionsoft-php-sdk allows code execution via the ContactId parameter in leadscoring.php.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A reflected XSS vulnerability in the novaksolutions/infusionsoft-php-sdk allows code execution via the ContactId parameter in leadscoring.php.
Vulnerability
CVE-2017-6216 is a reflected cross-site scripting (XSS) vulnerability in the novaksolutions/infusionsoft-php-sdk, version v2016-10-31, specifically in the example script leadscoring.php. The script fails to properly sanitize the ContactId HTTP parameter from the $_REQUEST array, allowing an attacker to inject arbitrary JavaScript code [4].
Exploitation
An attacker can exploit this by crafting a malicious URL that includes JavaScript in the ContactId parameter, such as ?ContactId=">". When a victim clicks the link, the script executes in their browser. No authentication is required to access the example scripts, and the vulnerability can be triggered from any web browser [4].
Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the vulnerable site, potentially leading to session hijacking, credential theft, or other malicious actions performed on behalf of the victim.
Mitigation
The vulnerability was addressed in a commit that uses htmlspecialchars to escape user-supplied data before output [1]. Users are advised to update the SDK to the latest version or apply the patch to prevent XSS attacks.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
novaksolutions/infusionsoft-php-sdkPackagist | < 1.0 | 1.0 |
Affected products
2- novaksolutions/infusionsoft-php-sdkdescription
Patches
1110c06ffe0cdRemove empty example files and escape output in example files.
10 files changed · +22 −33
Infusionsoft/examples/contact_tree.php+2 −2 modified@@ -67,7 +67,7 @@ function dumpObject($object, $indent = 0) <tr><? foreach ($object->getFields() as $field) { ?> - <th><?=$field?></th> + <th><?=htmlspecialchars($field)?></th> <? } ?></tr> @@ -76,7 +76,7 @@ function dumpObject($object, $indent = 0) <tr><? foreach ($object->getFields() as $field) { ?> - <td><?=htmlentities($data[$field])?></td><? + <td><?=htmlspecialchars($data[$field])?></td><? } ?></tr> </tbody>
Infusionsoft/examples/create_order.php+1 −1 modified@@ -9,7 +9,7 @@ $recurringOrder->StartDate = date('Y-m-d H:i:s', strtotime("-1 month")); $recurringOrder->PaidThruDate = date('Y-m-d H:i:s', strtotime("-1 month")); $recurringOrder->save(); - echo "<h1>Subscription Created: $recurring_order_id</h1>"; + echo "<h1>Subscription Created: " . htmlspecialchars($recurring_order_id) . "</h1>"; } ?>
Infusionsoft/examples/exporter.php+4 −4 modified@@ -26,7 +26,7 @@ $file_name = "../exports/" . $_GET['object'] . '_export_' . date('Ymd-h.i.s') . '.csv'; - echo 'Creating csv file: ' . $file_name . '<br/>'; + echo 'Creating csv file: ' . htmlspecialchars($file_name) . '<br/>'; $csv_file = fopen($file_name, 'w'); fputcsv($csv_file, $object->getFields(), ",", "\""); @@ -50,7 +50,7 @@ echo 'Closing csv file. <br/>'; fclose($csv_file); - ?><a href="<?=$file_name?>"><?=$file_name?></a><br/><br/><? + ?><a href="<?=htmlspecialchars($file_name)?>"><?=htmlspecialchars($file_name)?></a><br/><br/><? if($_GET['object'] == 'Template'){ echo 'Exporting email templates into files.' . "<br/>"; @@ -72,7 +72,7 @@ $template = Infusionsoft_APIEmailService::getEmailTemplate($result->Id); $file_name = "../exports/" . $_GET['object'] . '_' . $result->Id . '_' . date('Ymd-h.i.s') . '.txt'; - echo 'Creating file: ' . $file_name . '<br/>'; + echo 'Creating file: ' . htmlspecialchars($file_name) . '<br/>'; $file = fopen($file_name, 'w'); fwrite($file, 'Title: ' . $template['pieceTitle'] . "\n"); fwrite($file, 'Categories: ' . $template['categories'] . "\n"); @@ -103,7 +103,7 @@ global $all_tables; sort($all_tables); foreach($all_tables as $table){ - ?><option value="<?php echo $table; ?>"><?php echo $table; ?></option><?php + ?><option value="<?php echo htmlspecialchars($table); ?>"><?php echo htmlspecialchars($table); ?></option><?php } ?> </select><br/>
Infusionsoft/examples/generate-code.php+0 −8 removed@@ -1,8 +0,0 @@ -<?php -/** - * Created by JetBrains PhpStorm. - * User: Joey - * Date: 8/24/12 - * Time: 2:01 PM - * To change this template use File | Settings | File Templates. - */ \ No newline at end of file
Infusionsoft/examples/get_invoices_for_contact.php+3 −3 modified@@ -5,7 +5,7 @@ <html> <body> <form method="post"> - ContactId: <input type="text" name="ContactId" value="<?php if(isset($_POST['ContactId'])) echo $_POST['ContactId']; ?>"><br/> + ContactId: <input type="text" name="ContactId" value="<?php if(isset($_POST['ContactId'])) echo htmlspecialchars($_POST['ContactId']); ?>"><br/> <input type="submit"/> </form> @@ -23,8 +23,8 @@ foreach($invoice->getFields() as $field){ ?> <tr> - <td><?php echo $field; ?></td> - <td><?php echo $invoice->$field; ?></td> + <td><?php echo htmlspecialchars($field); ?></td> + <td><?php echo htmlspecialchars($invoice->$field); ?></td> </tr> <?php }
Infusionsoft/examples/leadscoring.php+2 −2 modified@@ -1,5 +1,5 @@ <form> - ContactId: <input type="text" name="ContactId" value="<?php if(isset($_REQUEST['ContactId'])) echo $_REQUEST['ContactId']; ?>" /> + ContactId: <input type="text" name="ContactId" value="<?php if(isset($_REQUEST['ContactId'])) echo htmlspecialchars($_REQUEST['ContactId']); ?>" /> <input type="submit"/> </form><br/> <?php @@ -11,6 +11,6 @@ $contact->_LeadScore = $contact->_LeadScore + 1; $contact->save(); - echo 'Lead Score for Contact: ' . $contact->FirstName . ' ' . $contact->LastName . ' is now: ' . $contact->_LeadScore; + echo 'Lead Score for Contact: ' . htmlspecialchars($contact->FirstName) . ' ' . htmlspecialchars($contact->LastName) . ' is now: ' . htmlspecialchars($contact->_LeadScore); }
Infusionsoft/examples/list_objects.php+2 −2 modified@@ -13,7 +13,7 @@ global $all_tables; sort($all_tables); foreach($all_tables as $table){ - ?><option value="<?php echo $table; ?>"><?php echo $table; ?></option><?php + ?><option value="<?php echo htmlspecialchars($table); ?>"><?php echo htmlspecialchars($table); ?></option><?php } ?> </select><br/> @@ -32,7 +32,7 @@ <tr> <?php foreach($object->getFields() as $field){ - ?><th><?=$field?></th><?php + ?><th><?=htmlspecialchars($field)?></th><?php } ?> </tr>
Infusionsoft/examples/object_editor.php+6 −6 modified@@ -14,7 +14,7 @@ $object = new $class_name($_GET['Id']); } catch(Exception $e){ - echo $e->getMessage(); + echo htmlspecialchars($e->getMessage()); renderLoadForm(); return; } @@ -35,7 +35,7 @@ $object = new $class_name($_GET['Id']); } catch(Exception $e){ - echo $e->getMessage(); + echo htmlspecialchars($e->getMessage()); renderLoadForm(); return; } @@ -51,7 +51,7 @@ function renderLoadForm(){ global $all_tables; sort($all_tables); foreach($all_tables as $table){ - ?><option value="<?php echo $table; ?>"><?php echo $table; ?></option><?php + ?><option value="<?php echo htmlspecialchars($table); ?>"><?php echo htmlspecialchars($table); ?></option><?php } ?> </select><br/> @@ -65,12 +65,12 @@ function renderLoadForm(){ function renderObjectForm($object){ ?> <form method="post"> - <input type="hidden" name="object" value="<?php echo $object->getTable();?>"/> + <input type="hidden" name="object" value="<?php echo htmlspecialchars($object->getTable());?>"/> <?php foreach($object->toArray() as $field=>$value){ ?> - <?php echo $field; ?><br/> - <input type="text" name="<?php echo $field; ?>" value="<?php echo $value; ?>"><br/> + <?php echo htmlspecialchars($field); ?><br/> + <input type="text" name="<?php echo htmlspecialchars($field); ?>" value="<?php echo htmlspecialchars($value); ?>"><br/> <?php } ?>
Infusionsoft/examples/subscription_tree.php+2 −2 modified@@ -73,7 +73,7 @@ function dumpObject($object, $indent = 0) <tr><? foreach ($object->getFields() as $field) { ?> - <th><?=$field?></th> + <th><?=htmlspecialchars($field)?></th> <? } ?></tr> @@ -82,7 +82,7 @@ function dumpObject($object, $indent = 0) <tr><? foreach ($object->getFields() as $field) { ?> - <td><?=htmlentities($data[$field])?></td><? + <td><?=htmlspecialchars($data[$field])?></td><? } ?></tr> </tbody>
Infusionsoft/examples/view_incomplete_orders.php+0 −3 removed@@ -1,3 +0,0 @@ -<?php -include('../useful_scripts.php'); -?>
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4News mentions
0No linked articles in our index yet.