⛔ Critical Security Advisory asAffili · WordPress.org · 1.1.1 Disclosed 2026-07-10 · 18:00 UTC
Full technical detail published. The 45-day coordinated-disclosure window (vendor notified 2026-07-10) has passed; the exact code location and analysis are shown below. No weaponised exploit is published.
Advisory · CLR-2026-3027

Unauthenticated SQL Injection in the WordPress plugin asAffili (1.1.1)

asAffili (WordPress.org, version 1.1.1) The WordPress plugin asAffili (1.1.1) registers a public, unauthenticated admin-ajax.php action whose handler builds a SQL query by string concatenation. A request parameter is passed only through sanitize_text_field() — which strips tags but does not escape SQL — so an unauthenticated visitor can inject SQL and read arbitrary database contents (WordPress user password hashes, secrets). A second authenticated (Subscriber+) variant with no nonce or capability check exists in the same file, along with several further unparameterised queries. The plugin has been unmaintained since January 2020; no fixed release exists — remove it.

CriticalSQL InjectionUnauthenticatedWordPressVerified in source
Summary

asAffili 1.1.1 (WordPress.org) contains an unauthenticated sql injection. The plugin registers a handler reachable by visitors who are not logged in, and it concatenates a request parameter straight into a live SQL statement.

The only input handling is sanitize_text_field(), which strips HTML tags but performs no SQL escaping, so the value reaches the database driver unparameterised. The result is a blind/time-based SQL-injection channel through which the full database (user password hashes, secrets) can be extracted.

asAffili was surfaced automatically by the codelake WordPress static-analysis pipeline (source-to-sink taint) · AI false-positive triage · manual source verification, and then verified by hand against the shipped 1.1.1 artifact. The plugin has not been updated since 2020-01-05; because no patched release exists, the correct remediation is to remove it.

Impact

Class: SQL Injection (CWE-89). Privilege required: none — the injectable endpoint is registered for logged-out visitors. Effect: read access to the entire database via blind SQL injection (credential hashes, secrets, tokens); depending on database privileges, write access.

A second variant with the same flaw exists in the same file. The precise locations and code are withheld below until the disclosure deadline.

Vulnerable code
asaffili/admin/imports.php ⛔ unauthenticated sql injection
113 // registered for logged-out visitors — no authentication required
113add_action('wp_ajax_nopriv_asaffilinewcatstr', [$this, 'ajax_asaffilisetnewcatstr']);
848function ajax_asaffilisetnewcatstr() {
851 $id = sanitize_text_field($_REQUEST["id"]); // NOT SQL-escaped
857  $result = wp_insert_term($newcatstr, ..., ['parent' => $topcatid]);
859  if ($result["term_id"] > 0) {
862 $sql = "update ".$wpdb->prefix."asaffili_catid set cat_id=".$result["term_id"]." where id=".$id;
863    $wpdb->query($sql); // $id concatenated raw into WHERE
  }
867}
Technical detail

Because the action carries the wp_ajax_nopriv_ prefix it is reachable without a session. The tainted value lands in the query with no parameterisation.

Related: wp_ajax_asaffili-set-catid (ajax_asaffili_set_catid, imports.php:816) — Subscriber+, no nonce/capability, CSRF-able.

Further unparameterised queries: around lines 63, 83, 830, 843, 1298-1537 in admin/imports.php.

A working proof-of-concept is intentionally not published; the exact reproduction was shared privately with WordPress Plugin Security Team.

Timeline
—
Published
asAffili listed on WordPress.org; last updated 2020-01-05, unmaintained since.
2026-07-10
Automatic detection
codelake WordPress static-analysis pipeline (source-to-sink taint) flags a request-to-database taint flow with no prepared statement; AI-triage marks it a real finding.
2026-07-10
Manual verification
Confirmed against the shipped 1.1.1 artifact — unauthenticated reachability verified in source.
2026-07-10
8:00 UTC
WordPress Plugin Security Team notified
Coordinated disclosure opened with full technical detail; a 45-day window begins.
2026-08-24
Technical-detail reveal
The exact code location and reproduction are published automatically after the 45-day window.
Indicators & characteristics
PKGasAffili 1.1.1 (WordPress.org) — wordpress.org/plugins/asaffili
SHA25670466ae04bab38f891db5f3a8a828c2b4e0d08f34dbc5909e06a66e5e277a0cd (artifact)
CLASSCWE-89 SQL Injection · sanitize_text_field() used as an (ineffective) SQL neutraliser
AUTHZNo authentication required · no nonce · no capability check
SINKexact file:line of the injectable sink
ENTRYexact endpoint / action name
Remediation
#ActionPriority
01 Deactivate and delete asAffili. No patched release exists and it is abandoned; sites should not run version 1.1.1. Critical
02 Patch: replace every concatenated query with $wpdb->prepare() and typed placeholders (%d/%s). High
03 Add nonce + capability checks (check_ajax_referer(), current_user_can()) to state-changing AJAX handlers and remove any unintended nopriv registration. High
04 Check access logs for requests with SQL metacharacters in parameters during the exposure window. Recommended

Detected by codelake Research · codelake WordPress static-analysis pipeline (source-to-sink taint) · AI false-positive triage · manual source verification · disclosed to WordPress Plugin Security Team before publication.

This is a coordinated vulnerability disclosure. The affected package, version and class are published immediately so defenders can act; the exact code location and reproduction are withheld until the deadline, and no weaponised proof-of-concept is published. The archived artifact is available to verified security researchers on request.