We currently support the following versions with security updates:
| Version | Supported |
|---|---|
| 1.3.x | ✅ Active |
| 1.2.x | ✅ Active |
| 1.1.x | |
| < 1.1 | ❌ Unsupported |
We take the security of React Magnifier seriously. If you believe you have found a security vulnerability, please follow these steps:
- Do not disclose the vulnerability publicly via GitHub Issues, Discussions, or Pull Requests
- Do not create a public issue mentioning the vulnerability
- Send details to the maintainers via email at sandeepv68@gmail.com
- Type of vulnerability (XSS, prototype pollution, dependency issue, etc.)
- Full steps to reproduce the issue
- React version and browser where the issue was observed
- Any proof-of-concept code (if available)
- Impact assessment
- 24 hours: Initial acknowledgment of your report
- 72 hours: Assessment and severity classification
- 7 days: Patch development and testing (for confirmed vulnerabilities)
- 14 days: Public disclosure with fix release
React Magnifier uses React's built-in XSS protection. All user-provided strings (imageUrl, imageAltText, cursor, magnifierBorderColor, magnifierBorderStyle) are rendered as attributes or text content — never as raw HTML. However, consumers should still validate any user-supplied URLs passed to imageUrl.
- styled-components is the sole runtime peer dependency and is regularly monitored for CVEs
- All dependencies are checked with
npm auditbefore each release - Dependencies are pinned to exact versions in
package-lock.json - Dependabot is configured (if enabled) for automated security updates
The component validates critical props at runtime:
imageUrlmust be a non-empty string (error logged if missing)zoomSizemust be a positive number- Magnifier dimensions must be positive numbers
For non-security bugs, feature requests, or general issues, please use the GitHub Issues page.
- Validate image URLs: Ensure
imageUrlpoints to trusted sources, especially if user-generated - Keep dependencies updated: Regularly run
npm updateor use Dependabot - Use Content Security Policy: Add appropriate CSP headers to your application
- Sanitize alt text: If
imageAltTextincludes user input, sanitize it before passing to the component - Review custom CSS classes: When using
customImgClassorcustomContainerClass, ensure the class names do not conflict with sensitive selectors
We thank the security research community and our users for responsibly disclosing vulnerabilities and helping us keep React Magnifier secure.