Exploit database

GH-0fcb3446e6b0312a8787f37d73c5cfdd

joshuaprovoste/0-click-rce-exploit-for-cve-2024-51791

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2024-51791

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files5

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

plugin/2.7.0/gutenberg/input-field/src/save.js

JavaScript · 1,131 bytes
import { __ } from '@wordpress/i18n';
import { useBlockProps } from '@wordpress/block-editor';

export default function save(props) {
    
     const {
        attributes,
        className,
        clientId
    } = props;
    
    const {
        type, required, name, label, default_value, placeholder, minimum, maximum
    } = attributes;
    
    
    const blockPropsParent = useBlockProps.save({
        className: className
    });
    
    const inputProps = {
        className: 'madeit-forms-input-field',
        type: type,
        name: name,
        required: required,
        value: default_value,
        placeholder: placeholder
    };

    if(type === 'number') {
        if(minimum !== undefined && minimum !== null) {
            inputProps.min = minimum;
        }

        if(maximum !== undefined && maximum !== null) {
            inputProps.max = maximum;
        }
    }
    
	return (
        <div { ...blockPropsParent }>
            { label !== undefined && label !== null && label.length > 0 ? <div><label>{ label }</label></div> : null }
            <input { ...inputProps } />
        </div>
	);
}