REPORT / 01

Analysis Report · Folder Analysis cache/forminator_1.52.1 → cache/forminator_1.52.2 — CVE-2026-5192

Shared security patch analysis results

mode patchdiff ai claude claude-haiku-4-5-20251001
02 · Lifecycle actions cancel · resume · skip · regenerate · redo
03 · Share this analysis copy link · embed report
03 · CVE Security Analysis & Writeups ai-generated · per cve

Comprehensive security analysis generated by AI for each confirmed CVE match. Click on a CVE to view the detailed writeup including vulnerability background, technical details, patch analysis, and PoC guide.

CVE-2026-5192 NVD
AI-Generated Analysis
05 · Findings filter · search · paginate
Use quotes for exact: "SQL injection" · Operators: hello AND bye, admin OR root, -error, NOT warning
Showing 0 to 0 of 0 results
library/abstracts/abstract-class-mail.php AI: 1 vulnerabilities CVE-2026-5192
--- cache/forminator_1.52.1/library/abstracts/abstract-class-mail.php	2026-05-05 00:17:19.878647065 +0000+++ cache/forminator_1.52.2/library/abstracts/abstract-class-mail.php	2026-05-05 00:17:28.979299440 +0000@@ -351,11 +351,33 @@ 		// Set email context to false to avoid replacing images in PDFs. 		$old_value              = self::$is_email_context; 		self::$is_email_context = false;+		$attachment             = $this->filter_attachments( $attachment ); 		$this->attachment       = apply_filters( 'forminator_custom_form_mail_attachment', $attachment, $custom_form, $entry, $this->pdfs ); 		self::$is_email_context = $old_value; 	}  	/**+	 * Filter attachments to make sure only files in upload dir can be attached.+	 *+	 * @param array $attachments Attachments to filter.+	 * @return array+	 */+	private function filter_attachments( $attachments ) {+		if ( ! empty( $attachments ) ) {+			$upload_dir = wp_upload_dir();+			if ( ! empty( $upload_dir['basedir'] ) ) {+				foreach ( $attachments as $key => $attachment ) {+					if ( 0 !== strpos( $attachment, $upload_dir['basedir'] ) ) {+						unset( $attachments[ $key ] );+					}+				}+			}+		}++		return $attachments;+	}++	/** 	 * Set headers 	 * 	 * @since 1.0
AI Analysis
# Security Vulnerability Analysis

Vulnerability Existed: yes

**Path Traversal / Arbitrary File Attachment** [library/abstracts/abstract-class-mail.php] [Lines 354-378]

**Old Code:**
```php
// Set email context to false to avoid replacing images in PDFs.
$old_value              = self::$is_email_context;
self::$is_email_context = false;
$this->attachment       = apply_filters( 'forminator_custom_form_mail_attachment', $attachment, $custom_form, $entry, $this->pdfs );
self::$is_email_context = $old_value;
```

**Fixed Code:**
```php
// Set email context to false to avoid replacing images in PDFs.
$old_value              = self::$is_email_context;
self::$is_email_context = false;
$attachment             = $this->filter_attachments( $attachment );
$this->attachment       = apply_filters( 'forminator_custom_form_mail_attachment', $attachment, $custom_form, $entry, $this->pdfs );
self::$is_email_context = $old_value;

/**
 * Filter attachments to make sure only files in upload dir can be attached.
 *
 * @param array $attachments Attachments to filter.
 * @return array
 */
private function filter_attachments( $attachments ) {
	if ( ! empty( $attachments ) ) {
		$upload_dir = wp_upload_dir();
		if ( ! empty( $upload_dir['basedir'] ) ) {
			foreach ( $attachments as $key => $attachment ) {
				if ( 0 !== strpos( $attachment, $upload_dir['basedir'] ) ) {
					unset( $attachments[ $key ] );
				}
			}
		}
	}

	return $attachments;
}
```

**Description:** The vulnerability was an arbitrary file attachment issue where attachments were not validated to ensure they resided within the WordPress upload directory. The fix implements the `filter_attachments()` method to validate that all attachment paths begin with the upload directory path, preventing path traversal attacks that could attach sensitive files outside the intended directory.
CVE Analysis Results:
CVE-2026-5192: Yes
View CVE Description
The Forminator Forms – Contact Form, Payment Form & Custom Form Builder plugin for WordPress is vulnerable to Path Traversal in versions up to, and including, 1.52.1 via the 'upload-1[file][file_path]' parameter. This makes it possible for unauthenticated attackers to read the contents of arbitrary files on the server, which can contain sensitive information. Successful exploitation requires a publicly accessible form with a File Upload field where Save and Continue is enabled in that form's Behavior settings and the Save and Continue email notification is configured to attach uploaded files in Email Notifications.
Showing 1 to 1 of 1 results