Skip to content

Commit

Permalink
Release 1.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Jan 20, 2025
1 parent f196d84 commit fbfe4e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Fedify changelog
Version 1.0.14
--------------

To be released.
Released on January 21, 2025.

- Fixed several security vulnerabilities of the `lookupWebFinger()` function.
[[CVE-2025-23221]]

- Fixed a security vulnerability where the `lookupWebFinger()` function
had followed the infinite number of redirects, which could lead to
Expand All @@ -24,6 +25,8 @@ To be released.
could lead to a SSRF attack. Now it follows only the public network
addresses.

[CVE-2025-23221]: https://github.com/dahlia/fedify/security/advisories/GHSA-c59p-wq67-24wx


Version 1.0.13
--------------
Expand Down
8 changes: 7 additions & 1 deletion src/runtime/url.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { LookupAddress } from "node:dns";
import { lookup } from "node:dns/promises";
import { isIP } from "node:net";

Expand Down Expand Up @@ -38,7 +39,12 @@ export async function validatePublicUrl(url: string): Promise<void> {
}
// To prevent SSRF via DNS rebinding, we need to resolve all IP addresses
// and ensure that they are all public:
const addresses = await lookup(hostname, { all: true });
let addresses: LookupAddress[];
try {
addresses = await lookup(hostname, { all: true });
} catch {
addresses = [];
}
for (const { address, family } of addresses) {
if (
family === 4 && !isValidPublicIPv4Address(address) ||
Expand Down

0 comments on commit fbfe4e1

Please sign in to comment.