link-preview-js icon indicating copy to clipboard operation
link-preview-js copied to clipboard

SSRF error occurs on Specific IP

Open safa-kajabi opened this issue 9 months ago • 0 comments

Describe the bug A clear and concise description of what the bug is.

Recently a user reported that they are unable to display a link preview for their shared link. I investigated this and found that the library throws an error for that specific https://nillaskitchen.com/2024/01/27/steg-for-att-sjalvstandigt-balansera-ibs-eller-andra-problem-mage-tarm/. The issue occurs during the resolveDNSHost part; when the address is 192.0.78.212, it throws the SSRF error. The IP is belongs to wordpress. Do you have any suggestion why it doesn't work or an idea why this occurs for that IP and a way to resolve this issue?

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

  • It should generate link preview for that specific link.

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot 2024-05-09 at 14 16 15

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Any browser
  • Version: -

Additional context Add any other context about the problem here.

safa-kajabi avatar May 09 '24 11:05 safa-kajabi